<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>员工行为排查工具PC端原型图</title>
    <!-- Element UI CSS -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui@2.15.14/lib/theme-chalk/index.css" />
    <!-- Vue.js -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.min.js"></script>
    <!-- Element UI JS -->
    <script src="https://unpkg.com/element-ui@2.15.14/lib/index.js"></script>
    <style>
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }

      body {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
          'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
        background-color: #f0f2f5;
      }

      #app {
        display: flex;
        flex-direction: column;
        height: 100vh;
      }

      /* 顶部导航栏 */
      .top-navbar {
        height: 56px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 24px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
      }

      .top-navbar .logo {
        font-size: 18px;
        font-weight: bold;
        display: flex;
        align-items: center;
      }

      .top-navbar .user-info {
        display: flex;
        align-items: center;
        gap: 16px;
      }

      /* 主容器 */
      .main-container {
        display: flex;
        margin-top: 56px;
        height: calc(100vh - 56px);
      }

      /* 左侧菜单栏 */
      .sidebar {
        width: 200px;
        background: white;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
        overflow-y: auto;
        position: fixed;
        left: 0;
        top: 56px;
        bottom: 0;
        z-index: 999;
      }

      .sidebar .el-menu {
        border-right: none;
      }

      /* 内容区域 */
      .content-area {
        flex: 1;
        margin-left: 200px;
        padding: 24px;
        overflow-y: auto;
        background-color: #f0f2f5;
      }

      /* 页面标题 */
      .page-header {
        margin-bottom: 24px;
      }

      .page-header h2 {
        font-size: 24px;
        color: #333;
        margin-bottom: 8px;
      }

      .page-header .breadcrumb {
        font-size: 14px;
        color: #999;
      }

      /* 筛选区域 */
      .filter-section {
        background: white;
        padding: 24px;
        border-radius: 8px;
        margin-bottom: 24px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
      }

      .filter-row {
        margin-bottom: 16px;
      }

      .filter-row:last-child {
        margin-bottom: 0;
      }

      .filter-buttons {
        margin-top: 16px;
        text-align: right;
      }

      /* 统计看板样式 */
      .dashboard-container {
        display: flex;
        flex-direction: column;
        gap: 20px;
      }

      .stat-item {
        text-align: center;
        padding: 20px 15px;
        border: 1px solid #ebeef5;
        border-radius: 4px;
        background: #fafafa;
        transition: all 0.3s ease;
        height: 120px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: relative;
        min-width: 160px;
        margin-bottom: 20px;
      }

      .stat-item:hover {
        background: #f0f9ff;
        border-color: #409eff;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(64, 158, 255, 0.15);
      }

      .stat-label {
        font-size: 13px;
        color: #606266;
        margin-bottom: 12px;
        font-weight: 500;
        line-height: 1.2;
        word-break: break-all;
      }

      .stat-value {
        font-size: 18px;
        font-weight: bold;
        color: #303133;
        line-height: 1;
        margin-bottom: 8px;
      }

      /* 带环状图的卡片特殊样式 */
      .stat-item.has-chart {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 20px;
      }

      .stat-item.has-chart .stat-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        flex: 1;
      }

      .stat-item.has-chart .stat-label {
        margin-bottom: 8px;
      }

      .stat-item.has-chart .stat-value {
        margin-bottom: 0;
      }

      /* 百分比环状图样式 */
      .percentage-chart {
        width: 55px;
        height: 55px;
        flex-shrink: 0;
      }

      .chart-container {
        position: relative;
        width: 100%;
        height: 100%;
      }

      .chart-circle {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
      }

      .chart-circle:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
      }

      .chart-circle::before {
        content: '';
        position: absolute;
        width: 60%;
        height: 60%;
        background: white;
        border-radius: 50%;
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
      }

      .chart-text {
        position: absolute;
        font-size: 11px;
        font-weight: 600;
        color: #303133;
        z-index: 1;
        text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
      }

      /* 环状图动画效果 */
      .chart-circle {
        animation: chartAppear 0.6s ease-out;
      }

      @keyframes chartAppear {
        from {
          opacity: 0;
          transform: scale(0.8);
        }
        to {
          opacity: 1;
          transform: scale(1);
        }
      }

      /* 长文本缩小字体 */
      .stat-label.long-text {
        font-size: 11px;
      }

      .stat-label.very-long-text {
        font-size: 10px;
      }

      /* 批次管理弹窗样式 */
      .detail-card {
        margin-bottom: 16px;
      }

      .detail-item {
        margin-bottom: 12px;
      }

      .detail-label {
        font-weight: 500;
        color: #606266;
        margin-right: 8px;
      }

      .detail-value {
        color: #303133;
      }

      .stat-item {
        text-align: center;
        padding: 16px;
        background: #f8f9fa;
        border-radius: 8px;
      }

      .stat-number {
        font-size: 24px;
        font-weight: bold;
        color: #409eff;
        margin-bottom: 8px;
      }

      .stat-number.success {
        color: #67c23a;
      }

      .stat-number.warning {
        color: #e6a23c;
      }

      .stat-number.danger {
        color: #f56c6c;
      }

      .stat-label {
        font-size: 14px;
        color: #606266;
      }

      .warning-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 12px;
        background: #f8f9fa;
        border-radius: 6px;
        margin-bottom: 8px;
      }

      .warning-count {
        font-weight: bold;
        color: #303133;
      }

      /* 预审弹窗样式 */
      .employee-info-card {
        margin-bottom: 16px;
      }

      .info-item {
        margin-bottom: 12px;
      }

      .info-label {
        font-weight: 500;
        color: #606266;
        margin-right: 8px;
      }

      .info-value {
        color: #303133;
      }

      .review-card {
        margin-bottom: 16px;
      }

      .review-item {
        margin-bottom: 20px;
        padding: 16px;
        border: 1px solid #e4e7ed;
        border-radius: 8px;
      }

      .review-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
      }

      .review-title {
        font-weight: 600;
        color: #303133;
        font-size: 16px;
      }

      .review-actions {
        display: flex;
        gap: 8px;
      }

      .review-status {
        margin-bottom: 12px;
      }

      .review-comment {
        margin-top: 12px;
      }

      .review-summary-card {
        margin-bottom: 16px;
      }

      /* 表格区域 */
      .table-section {
        background: white;
        padding: 24px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
      }

      .table-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 16px;
      }

      .table-title {
        font-size: 16px;
        font-weight: bold;
        color: #333;
      }

      .table-actions {
        display: flex;
        gap: 8px;
      }

      /* 预警等级徽章 */
      .warning-badge {
        display: inline-block;
        padding: 4px 12px;
        border-radius: 12px;
        font-size: 12px;
        font-weight: bold;
      }

      .warning-badge.normal {
        background-color: #00c851;
        color: white;
      }

      .warning-badge.necessary-attention {
        background-color: #00c851;
        color: white;
      }

      .warning-badge.level-1 {
        background-color: #ffd700;
        color: #333;
      }

      .warning-badge.level-2 {
        background-color: #ff8800;
        color: white;
      }

      .warning-badge.level-3 {
        background-color: #ff4444;
        color: white;
      }

      /* 核实状态标签样式 */
      .verification-badge {
        display: inline-block;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 12px;
        font-weight: 500;
      }

      .verified-status {
        background-color: #13ce66;
        color: white;
      }

      .unverified-status {
        background-color: #ff4757;
        color: white;
      }

      /* 表格单元格编辑图标 */
      .editable-cell {
        cursor: pointer;
        position: relative;
      }

      .editable-cell:hover {
        background-color: #f5f7fa;
      }

      .editable-cell:hover .edit-icon {
        display: inline;
      }

      .edit-icon {
        display: none;
        margin-left: 4px;
        color: #409eff;
        font-size: 12px;
      }

      /* 弹窗样式 */
      .dialog-footer {
        text-align: right;
      }

      .warning-text {
        color: #f56c6c;
        font-weight: bold;
      }

      .name-text {
        font-weight: 500;
      }

      .no-data {
        color: #999;
        text-align: center;
        padding: 20px;
        font-style: italic;
      }

      .operation-links {
        display: flex;
        gap: 12px;
        justify-content: center;
        align-items: center;
      }

      .operation-link {
        color: #409eff;
        text-decoration: none;
        font-size: 14px;
        cursor: pointer;
        transition: color 0.3s;
      }

      .operation-link:hover {
        color: #66b1ff;
        text-decoration: none;
      }

      /* 操作区规范样式 */
      .operation-column {
        text-align: center;
      }

      .operation-buttons {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0;
      }

      .operation-buttons .el-button {
        margin: 0;
        padding: 0 8px;
      }

      .operation-buttons .el-divider--vertical {
        margin: 0 4px;
        height: 16px;
      }

      /* 批量操作按钮样式 - 不受操作区样式影响 */
      .batch-operation-buttons {
        display: flex;
        gap: 12px;
        align-items: center;
      }

      .batch-operation-buttons .el-button {
        margin: 0;
        padding: 8px 16px;
        font-size: 14px;
      }

      /* 强制应用操作区样式 */
      .el-table .operation-column .cell {
        text-align: center !important;
        padding: 8px 0 !important;
      }

      .el-table .operation-column .operation-buttons {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0 !important;
      }

      .el-table .operation-column .operation-buttons .el-button {
        margin: 0 !important;
        padding: 0 8px !important;
      }

      .el-table .operation-column .operation-buttons .el-divider--vertical {
        margin: 0 4px !important;
        height: 16px !important;
      }

      /* 更强制性的样式覆盖 */
      .el-table td.operation-column .cell {
        text-align: center !important;
        padding: 8px 0 !important;
      }

      .el-table td.operation-column .cell .operation-buttons {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0 !important;
        width: 100% !important;
      }

      .el-table td.operation-column .cell .operation-buttons .el-button {
        margin: 0 !important;
        padding: 0 8px !important;
        flex-shrink: 0 !important;
      }

      .el-table td.operation-column .cell .operation-buttons .el-divider--vertical {
        margin: 0 4px !important;
        height: 16px !important;
        flex-shrink: 0 !important;
      }

      /* 修改记录列表 */
      .history-item {
        padding: 16px;
        background: #f5f7fa;
        border-radius: 4px;
        margin-bottom: 12px;
      }

      .history-item:last-child {
        margin-bottom: 0;
      }

      .history-item .history-header {
        display: flex;
        justify-content: space-between;
        margin-bottom: 8px;
        font-size: 14px;
      }

      .history-item .history-content {
        font-size: 13px;
        color: #606266;
        line-height: 1.6;
      }

      .history-item .history-content div {
        margin-bottom: 4px;
      }

      /* 表格固定列样式优化 */
      .el-table .el-table__fixed-right {
        box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
        background-color: white !important;
        z-index: 10 !important;
      }

      .el-table .el-table__fixed {
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
        background-color: white !important;
        z-index: 10 !important;
      }

      /* 修复固定列表头背景 */
      .el-table .el-table__fixed-header-wrapper {
        background-color: white !important;
      }

      /* 修复固定列单元格背景 */
      .el-table .el-table__fixed .el-table__cell {
        background-color: white !important;
      }

      .el-table .el-table__fixed-right .el-table__cell {
        background-color: white !important;
      }

      /* 修复固定列悬停效果 */
      .el-table .el-table__fixed .el-table__row:hover .el-table__cell {
        background-color: #f5f7fa !important;
      }

      .el-table .el-table__fixed-right .el-table__row:hover .el-table__cell {
        background-color: #f5f7fa !important;
      }

      /* 修复固定列选择框背景 */
      .el-table .el-table__fixed .el-checkbox {
        background-color: white !important;
      }

      .el-table .el-table__fixed-right .el-checkbox {
        background-color: white !important;
      }

      /* 分页样式 */
      .pagination-container {
        margin-top: 16px;
        text-align: right;
      }

      /* 统计概览区域样式 */
      .stats-card {
        margin-bottom: 24px;
      }

      .stats-overview {
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 20px 0;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border-radius: 8px;
      }

      .stat-item {
        text-align: center;
        flex: 1;
        padding: 0 10px;
      }

      .stat-value {
        font-size: 28px;
        font-weight: bold;
        color: #333;
        margin-bottom: 8px;
        line-height: 1;
      }

      .stat-value.submitted {
        color: #67c23a;
      }

      .stat-value.not-submitted {
        color: #f56c6c;
      }

      .stat-value.completion-rate {
        color: #409eff;
      }

      .stat-value.special-attention {
        color: #409eff;
      }

      .stat-value.warning.level1 {
        color: #ffd700;
      }

      .stat-value.warning.level2 {
        color: #ff8800;
      }

      .stat-value.warning.level3 {
        color: #ff4444;
      }

      .stat-label {
        font-size: 14px;
        color: #666;
        font-weight: 500;
      }
    </style>
  </head>
  <body>
    <div id="app">
      <!-- 顶部导航栏 -->
      <div class="top-navbar">
        <div class="logo">
          <i class="el-icon-office-building" style="margin-right: 8px"></i>
          员工行为排查工具PC端原型图
        </div>
        <div class="user-info">
          <span>人力管理员：李四</span>
          <el-button type="text" style="color: white" @click="handleLogout">
            <i class="el-icon-switch-button"></i>
            退出
          </el-button>
        </div>
      </div>

      <!-- 主容器 -->
      <div class="main-container">
        <!-- 左侧菜单栏 -->
        <div class="sidebar">
          <el-menu :default-active="activeMenu" @select="handleMenuSelect">
            <el-submenu index="system">
              <template slot="title">
                <i class="el-icon-setting"></i>
                <span>系统管理</span>
              </template>
              <el-menu-item index="user-management">用户管理</el-menu-item>
              <el-menu-item index="param-config">参数配置</el-menu-item>
            </el-submenu>
            <el-submenu index="statistics">
              <template slot="title">
                <i class="el-icon-data-line"></i>
                <span>排查管理</span>
              </template>
              <el-menu-item index="batch-management">
                <span>排查批次管理</span>
              </el-menu-item>
              <el-menu-item index="employee-submission">
                <span>排查资料管理</span>
              </el-menu-item>
              <el-menu-item index="ledger-management">
                <span>排查明细台账</span>
              </el-menu-item>
              <el-menu-item index="org-statistics">
                <span>排查汇总统计</span>
              </el-menu-item>
            </el-submenu>
            <!-- 统计看板菜单已隐藏 -->
            <!--
            <el-submenu index="dashboard">
              <template slot="title">
                <i class="el-icon-data-analysis"></i>
                <span>统计看板</span>
              </template>
              <el-menu-item index="data-dashboard">
                <span>数据统计看板</span>
              </el-menu-item>
            </el-submenu>
            -->
          </el-menu>
        </div>

        <!-- 内容区域 -->
        <div class="content-area">
          <!-- 用户管理页面 -->
          <div v-if="activeMenu === 'user-management'">
            <!-- 页面标题 -->
            <div class="page-header">
              <h2>用户管理</h2>
              <div class="breadcrumb">
                <span>系统管理</span>
                <span>/</span>
                <span>用户管理</span>
              </div>
            </div>

            <!-- 用户授权区域 -->
            <el-card shadow="never" style="margin-bottom: 24px">
              <div slot="header" class="clearfix">
                <span style="font-weight: 600; font-size: 16px">用户授权管理</span>
                <el-button style="float: right" type="primary" size="small" @click="handleAddUser">
                  <i class="el-icon-plus"></i>
                  添加授权用户
                </el-button>
              </div>

              <!-- 筛选区域 -->
              <el-form :model="userFilterForm" inline size="small" style="margin-bottom: 16px">
                <el-form-item label="所属机构">
                  <el-popover
                    placement="bottom-start"
                    width="400"
                    trigger="click"
                    v-model="userOrgPopoverVisible"
                    @show="handleUserOrgPopoverOpen"
                  >
                    <el-tree
                      ref="userOrgTree"
                      :data="orgTreeData"
                      :props="orgTreeProps"
                      node-key="value"
                      :default-expand-all="false"
                      :expand-on-click-node="true"
                      :highlight-current="true"
                      :current-node-key="userFilterForm.currentOrgKey"
                      @node-click="handleUserOrgTreeNodeClick"
                      style="max-height: 400px; overflow-y: auto"
                    ></el-tree>
                    <div style="text-align: right; margin-top: 10px">
                      <el-button size="mini" @click="handleUserOrgCancel">取消</el-button>
                      <el-button type="primary" size="mini" @click="handleUserOrgConfirm">
                        确定
                      </el-button>
                    </div>
                    <el-input
                      slot="reference"
                      v-model="userFilterForm.selectedOrgPath"
                      placeholder="请选择所属机构"
                      readonly
                      style="cursor: pointer; width: 200px"
                    >
                      <i slot="suffix" class="el-input__icon el-icon-arrow-down"></i>
                    </el-input>
                  </el-popover>
                </el-form-item>
                <el-form-item label="所属部门">
                  <el-select v-model="userFilterForm.dept" placeholder="请选择部门" clearable>
                    <el-option label="信贷部" value="1"></el-option>
                    <el-option label="风控部" value="2"></el-option>
                    <el-option label="人力资源部" value="3"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="授权角色">
                  <el-select v-model="userFilterForm.role" placeholder="请选择角色" clearable>
                    <el-option label="综合员" value="reviewer"></el-option>
                    <el-option label="部门负责人" value="dept_leader"></el-option>
                    <el-option label="人力管理员" value="hr_admin"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="授权状态">
                  <el-select v-model="userFilterForm.status" placeholder="请选择状态" clearable>
                    <el-option label="已启用" value="1"></el-option>
                    <el-option label="已禁用" value="0"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="姓名/工号">
                  <el-input
                    v-model="userFilterForm.keyword"
                    placeholder="请输入姓名或工号"
                    clearable
                  ></el-input>
                </el-form-item>
                <el-form-item>
                  <el-button type="primary" icon="el-icon-search" @click="handleUserSearch">
                    查询
                  </el-button>
                  <el-button icon="el-icon-refresh" @click="handleUserReset">重置</el-button>
                </el-form-item>
              </el-form>

              <!-- 用户列表 -->
              <el-table :data="userList" border stripe style="width: 100%">
                <el-table-column
                  type="index"
                  label="序号"
                  width="60"
                  align="center"
                ></el-table-column>
                <el-table-column
                  prop="name"
                  label="姓名"
                  width="120"
                  align="center"
                ></el-table-column>
                <el-table-column
                  prop="jobNumber"
                  label="工号"
                  width="120"
                  align="center"
                ></el-table-column>
                <el-table-column
                  prop="org"
                  label="所属机构"
                  width="180"
                  show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                  prop="dept"
                  label="所属部门"
                  width="140"
                  show-overflow-tooltip
                ></el-table-column>
                <el-table-column prop="role" label="授权角色" width="140" align="center">
                  <template slot-scope="scope">
                    <el-tag :type="getRoleType(scope.row.roleCode)" size="small">
                      {{ scope.row.role }}
                    </el-tag>
                  </template>
                </el-table-column>
                <el-table-column prop="status" label="授权状态" width="100" align="center">
                  <template slot-scope="scope">
                    <el-tag :type="scope.row.status === '已启用' ? 'success' : 'info'" size="small">
                      {{ scope.row.status }}
                    </el-tag>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="authTime"
                  label="授权时间"
                  width="180"
                  align="center"
                ></el-table-column>
                <el-table-column
                  prop="authBy"
                  label="授权人"
                  width="150"
                  align="center"
                ></el-table-column>
                <el-table-column
                  prop="lastUseTime"
                  label="最后使用时间"
                  width="180"
                  align="center"
                ></el-table-column>
                <el-table-column
                  label="操作"
                  width="200"
                  align="center"
                  fixed="right"
                  class-name="operation-column"
                >
                  <template slot-scope="scope">
                    <div class="operation-buttons">
                      <el-button type="text" size="small" @click="handleEditUserRole(scope.row)">
                        修改角色
                      </el-button>
                      <el-divider direction="vertical"></el-divider>
                      <el-button
                        type="text"
                        size="small"
                        @click="handleToggleUserStatus(scope.row)"
                      >
                        {{ scope.row.status === '已启用' ? '禁用' : '启用' }}
                      </el-button>
                      <el-divider direction="vertical"></el-divider>
                      <el-button
                        type="text"
                        size="small"
                        style="color: #f56c6c"
                        @click="handleRemoveAuth(scope.row)"
                      >
                        移除授权
                      </el-button>
                    </div>
                  </template>
                </el-table-column>
              </el-table>

              <!-- 分页 -->
              <div class="pagination-container">
                <el-pagination
                  @size-change="handleUserSizeChange"
                  @current-change="handleUserCurrentChange"
                  :current-page="userCurrentPage"
                  :page-sizes="[10, 20, 50, 100]"
                  :page-size="userPageSize"
                  layout="total, sizes, prev, pager, next, jumper"
                  :total="userTotal"
                ></el-pagination>
              </div>
            </el-card>

            <!-- 角色权限配置区域 -->
            <el-card shadow="never">
              <div slot="header" class="clearfix">
                <span style="font-weight: 600; font-size: 16px">角色权限配置</span>
                <span style="color: #909399; font-size: 13px; margin-left: 16px">
                  点击角色查看并配置权限
                </span>
              </div>

              <!-- 角色列表 -->
              <el-row :gutter="20" style="margin-bottom: 24px">
                <el-col :span="8" v-for="role in roleList" :key="role.id">
                  <el-card shadow="hover" :body-style="{ padding: '24px' }">
                    <div style="display: flex; justify-content: space-between; align-items: center">
                      <div style="flex: 1">
                        <div style="font-size: 18px; font-weight: 600; margin-bottom: 8px">
                          {{ role.name }}
                        </div>
                        <div style="color: #909399; font-size: 13px; margin-bottom: 12px">
                          {{ role.description }}
                        </div>
                        <div style="color: #606266; font-size: 14px">
                          <i class="el-icon-user"></i>
                          授权用户数：
                          <span style="color: #409eff; font-weight: 600">{{ role.userCount }}</span>
                          人
                        </div>
                      </div>
                      <el-button
                        type="primary"
                        icon="el-icon-setting"
                        @click="handleConfigPermission(role)"
                      >
                        配置权限
                      </el-button>
                    </div>
                  </el-card>
                </el-col>
              </el-row>

              <!-- 权限配置区域 -->
              <div
                v-if="currentRole"
                style="padding: 20px; background: #f5f7fa; border-radius: 4px"
              >
                <div
                  style="
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    margin-bottom: 16px;
                  "
                >
                  <div style="font-size: 16px; font-weight: 600">
                    {{ currentRole.name }} - 权限配置
                  </div>
                  <div>
                    <el-button size="small" @click="handleSavePermission">保存配置</el-button>
                    <el-button size="small" @click="currentRole = null">取消</el-button>
                  </div>
                </div>
                <el-tree
                  :data="permissionTree"
                  show-checkbox
                  node-key="id"
                  :default-expand-all="false"
                  :default-checked-keys="currentRole.permissions"
                  ref="permissionTree"
                  :props="{ children: 'children', label: 'label' }"
                ></el-tree>
              </div>
            </el-card>
          </div>

          <!-- 参数配置页面 -->
          <div v-if="activeMenu === 'param-config'">
            <!-- 页面标题 -->
            <div class="page-header">
              <h2>参数配置</h2>
              <div class="breadcrumb">
                <span>系统管理</span>
                <span>/</span>
                <span>参数配置</span>
              </div>
            </div>

            <!-- 评分模型参数卡片 -->
            <el-card shadow="never" style="margin-bottom: 24px">
              <div slot="header" class="clearfix">
                <span style="font-weight: 600; font-size: 16px">评分模型参数</span>
                <div style="float: right">
                  <el-button type="primary" size="small" @click="handleSaveParams">
                    保存配置
                  </el-button>
                  <el-button size="small" @click="handleRestoreDefault">恢复默认</el-button>
                  <el-button
                    type="success"
                    size="small"
                    icon="el-icon-data-analysis"
                    @click="handleOpenCalculator"
                  >
                    测算工具
                  </el-button>
                  <el-button size="small" icon="el-icon-time" @click="handleViewParamHistory">
                    变更历史
                  </el-button>
                </div>
              </div>

              <!-- 评分公式说明 -->
              <el-alert
                title="评分公式说明"
                type="info"
                :closable="false"
                style="margin-bottom: 20px"
              >
                <div slot="description" style="line-height: 1.8">
                  <div><strong>最终得分 = 基础分数(100) - Σ(排查项扣分)</strong></div>
                  <div>其中：排查项扣分 = 排查项数值 × 对应分值</div>
                  <div>最终得分 ≥ 0（最低为0分），最终得分 ≤ 100（最高为100分）</div>
                </div>
              </el-alert>

              <!-- 排查项分值配置 -->
              <div style="overflow-x: auto">
                <el-table :data="scoreParams" border stripe style="width: 100%; min-width: 1400px">
                  <el-table-column
                    type="index"
                    label="序号"
                    width="80"
                    align="center"
                    fixed="left"
                  ></el-table-column>
                  <el-table-column
                    prop="name"
                    label="排查项名称"
                    width="280"
                    show-overflow-tooltip
                    fixed="left"
                  ></el-table-column>
                  <el-table-column
                    prop="unit"
                    label="计算单位"
                    width="140"
                    align="center"
                  ></el-table-column>
                  <el-table-column label="数据积分阈值参数" width="180" align="center">
                    <template slot-scope="scope">
                      <el-input-number
                        v-model="scope.row.thresholdValue"
                        :min="0"
                        :max="100"
                        size="small"
                        controls-position="right"
                        style="width: 120px"
                      ></el-input-number>
                    </template>
                  </el-table-column>
                  <el-table-column label="数据评分标准和规则" min-width="400" align="center">
                    <template slot-scope="scope">
                      <div
                        style="
                          display: flex;
                          align-items: center;
                          gap: 12px;
                          flex-wrap: wrap;
                          justify-content: center;
                        "
                      >
                        <span style="white-space: nowrap">超阈值, 每多</span>
                        <el-input-number
                          v-model="scope.row.ruleX"
                          :min="1"
                          :max="10"
                          size="small"
                          controls-position="right"
                          style="width: 80px"
                        ></el-input-number>
                        <span style="white-space: nowrap">{{ scope.row.unit }}积</span>
                        <el-input-number
                          v-model="scope.row.ruleY"
                          :min="1"
                          :max="10"
                          size="small"
                          controls-position="right"
                          style="width: 80px"
                        ></el-input-number>
                        <span style="white-space: nowrap">分, 不设积分上限</span>
                      </div>
                    </template>
                  </el-table-column>
                  <el-table-column label="单项分数预警" width="200" align="center">
                    <template slot-scope="scope">
                      <div
                        style="
                          display: flex;
                          align-items: center;
                          gap: 12px;
                          flex-wrap: wrap;
                          justify-content: center;
                        "
                      >
                        <span style="white-space: nowrap">超</span>
                        <el-input-number
                          v-model="scope.row.warningThreshold"
                          :min="1"
                          :max="100"
                          size="small"
                          controls-position="right"
                          style="width: 80px"
                        ></el-input-number>
                        <span style="white-space: nowrap">以上, 一级预警</span>
                      </div>
                    </template>
                  </el-table-column>
                </el-table>
              </div>
            </el-card>

            <!-- 预警规则配置卡片 -->
            <el-card shadow="never">
              <div slot="header" class="clearfix">
                <span style="font-weight: 600; font-size: 16px">预警规则配置</span>
                <div style="float: right">
                  <el-button type="primary" size="small" @click="handleSaveWarningRules">
                    保存配置
                  </el-button>
                  <el-button size="small" @click="handleRestoreWarningDefault">恢复默认</el-button>
                </div>
              </div>

              <!-- 预警阈值配置 -->
              <el-card shadow="never">
                <div slot="header">
                  <span style="font-weight: 600">预警阈值配置（红线指标）</span>
                </div>
                <el-table :data="warningThresholds" border stripe>
                  <el-table-column
                    type="index"
                    label="序号"
                    width="60"
                    align="center"
                  ></el-table-column>
                  <el-table-column
                    prop="name"
                    label="指标名称"
                    min-width="240"
                    show-overflow-tooltip
                  ></el-table-column>
                  <el-table-column
                    prop="unit"
                    label="单位"
                    width="100"
                    align="center"
                  ></el-table-column>
                  <el-table-column label="当前值" width="120" align="center">
                    <template slot-scope="scope">
                      <el-input-number
                        v-model="scope.row.currentValue"
                        :min="scope.row.min"
                        :max="scope.row.max"
                        size="small"
                        controls-position="right"
                      ></el-input-number>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="description"
                    label="说明"
                    min-width="200"
                    show-overflow-tooltip
                  ></el-table-column>
                </el-table>
              </el-card>
            </el-card>
          </div>

          <!-- 员工资料提交管理页面 -->
          <div
            v-if="activeMenu === 'employee-submission'"
            :key="'employee-submission-' + submissionPageKey"
          >
            <!-- 页面标题 -->
            <div class="page-header">
              <h2>台账明细管理</h2>
              <div class="breadcrumb">
                <span>统计</span>
                <span>/</span>
                <span>台账明细管理</span>
              </div>
            </div>

            <!-- 筛选条件区域 -->
            <el-card class="filter-card" shadow="never">
              <el-form :model="submissionFilterForm" :inline="true" class="filter-form">
                <el-form-item label="批次">
                  <el-select
                    v-model="submissionFilterForm.batch"
                    multiple
                    placeholder="请选择批次"
                    style="width: 200px"
                  >
                    <el-option label="南京市分行2025年第一批次" value="2025Q1"></el-option>
                    <el-option label="南京市分行2025年第二批次" value="2025Q2"></el-option>
                    <el-option label="南京市分行2025年第三批次" value="2025Q3"></el-option>
                    <el-option label="南京市分行2025年第四批次" value="2025Q4"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="所属机构">
                  <el-popover
                    placement="bottom-start"
                    width="400"
                    trigger="click"
                    v-model="submissionOrgPopoverVisible"
                    @show="handleSubmissionOrgPopoverOpen"
                  >
                    <el-tree
                      ref="submissionOrgTree"
                      :data="orgTreeData"
                      :props="orgTreeProps"
                      node-key="value"
                      :default-expand-all="false"
                      :expand-on-click-node="true"
                      :highlight-current="true"
                      :current-node-key="submissionFilterForm.currentOrgKey"
                      @node-click="handleSubmissionOrgTreeNodeClick"
                      style="max-height: 400px; overflow-y: auto"
                    ></el-tree>
                    <div style="text-align: right; margin-top: 10px">
                      <el-button size="mini" @click="handleSubmissionOrgCancel">取消</el-button>
                      <el-button type="primary" size="mini" @click="handleSubmissionOrgConfirm">
                        确定
                      </el-button>
                    </div>
                    <el-input
                      slot="reference"
                      v-model="submissionFilterForm.selectedOrgPath"
                      placeholder="请选择所属机构"
                      readonly
                      style="cursor: pointer; width: 200px"
                    >
                      <i slot="suffix" class="el-input__icon el-icon-arrow-down"></i>
                    </el-input>
                  </el-popover>
                </el-form-item>
                <el-form-item label="所属部门">
                  <el-select
                    v-model="submissionFilterForm.department"
                    placeholder="请选择部门"
                    style="width: 200px"
                    clearable
                  >
                    <el-option label="办公室" value="办公室"></el-option>
                    <el-option label="公司金融部" value="公司金融部"></el-option>
                    <el-option label="个人金融部" value="个人金融部"></el-option>
                    <el-option label="风险管理部" value="风险管理部"></el-option>
                    <el-option label="相城区支行" value="相城区支行"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="提交状态">
                  <el-select
                    v-model="submissionFilterForm.status"
                    placeholder="请选择状态"
                    style="width: 150px"
                    clearable
                  >
                    <el-option label="全部" value=""></el-option>
                    <el-option label="未上报" value="not_reported"></el-option>
                    <el-option label="待预审" value="pending_review"></el-option>
                    <el-option label="分析中" value="analyzing"></el-option>
                    <el-option label="已完成" value="completed"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="姓名">
                  <el-input
                    v-model="submissionFilterForm.name"
                    placeholder="请输入姓名"
                    style="width: 150px"
                    clearable
                  ></el-input>
                </el-form-item>
                <el-form-item label="工号">
                  <el-input
                    v-model="submissionFilterForm.employeeId"
                    placeholder="请输入工号"
                    style="width: 150px"
                    clearable
                  ></el-input>
                </el-form-item>
                <el-form-item>
                  <el-button type="primary" @click="handleSubmissionQuery">
                    <i class="el-icon-search"></i>
                    查询
                  </el-button>
                  <el-button @click="handleSubmissionReset">
                    <i class="el-icon-refresh"></i>
                    重置
                  </el-button>
                </el-form-item>
              </el-form>
            </el-card>

            <!-- 操作按钮区域 -->
            <el-card class="operation-card" shadow="never">
              <div class="batch-operation-buttons">
                <el-button
                  type="warning"
                  @click="handleBatchUrge"
                  :disabled="selectedEmployees.length === 0"
                >
                  <i class="el-icon-message"></i>
                  批量催办 ({{ selectedEmployees.length }})
                </el-button>
                <el-button
                  type="primary"
                  @click="handleBatchSubmit"
                  :disabled="selectedEmployees.length === 0"
                >
                  <i class="el-icon-upload2"></i>
                  批量提交 ({{ selectedEmployees.length }})
                </el-button>
                <el-button type="success" @click="handleExport">
                  <i class="el-icon-download"></i>
                  导出数据
                </el-button>
                <el-button @click="handleRefresh">
                  <i class="el-icon-refresh"></i>
                  刷新
                </el-button>
              </div>
            </el-card>

            <!-- 统计概览区域 -->
            <el-card class="stats-card" shadow="never">
              <div class="stats-overview">
                <div class="stat-item">
                  <div class="stat-value">{{ submissionStats.totalEmployees }}</div>
                  <div class="stat-label">排查总数</div>
                </div>
                <div class="stat-item">
                  <div class="stat-value submitted">{{ submissionStats.submittedCount }}</div>
                  <div class="stat-label">已上报</div>
                </div>
                <div class="stat-item">
                  <div class="stat-value not-submitted">
                    {{ submissionStats.notSubmittedCount }}
                  </div>
                  <div class="stat-label">未上报</div>
                </div>
                <div class="stat-item">
                  <div class="stat-value special-attention">
                    {{ submissionStats.specialAttention }}
                  </div>
                  <div class="stat-label">特别关注</div>
                </div>
                <div class="stat-item">
                  <div class="stat-value warning level1">{{ submissionStats.level1Warning }}</div>
                  <div class="stat-label">一级预警</div>
                </div>
                <div class="stat-item">
                  <div class="stat-value warning level2">{{ submissionStats.level2Warning }}</div>
                  <div class="stat-label">二级预警</div>
                </div>
                <div class="stat-item">
                  <div class="stat-value warning level3">{{ submissionStats.level3Warning }}</div>
                  <div class="stat-label">三级预警</div>
                </div>
              </div>
            </el-card>

            <!-- 员工列表区域 -->
            <el-card class="table-card" shadow="never">
              <el-table
                :data="submissionTableData"
                v-loading="submissionLoading"
                @selection-change="handleSelectionChange"
                stripe
                border
                style="width: 100%"
                :header-cell-style="{ background: '#f5f7fa', color: '#606266' }"
              >
                <el-table-column type="selection" width="55" align="center"></el-table-column>
                <el-table-column
                  prop="index"
                  label="序号"
                  width="80"
                  align="center"
                ></el-table-column>
                <el-table-column prop="name" label="姓名" width="100" align="center" fixed="left">
                  <template slot-scope="scope">
                    <span class="name-text">{{ scope.row.name }}</span>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="employeeId"
                  label="工号"
                  width="120"
                  align="center"
                ></el-table-column>
                <el-table-column
                  prop="organization"
                  label="所属机构"
                  width="150"
                  show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                  prop="department"
                  label="所属部门"
                  width="120"
                  show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                  prop="batch"
                  label="批次"
                  width="120"
                  align="center"
                ></el-table-column>
                <el-table-column prop="status" label="提交状态" width="100" align="center">
                  <template slot-scope="scope">
                    <el-tag
                      :type="
                        scope.row.status === '已完成'
                          ? 'success'
                          : scope.row.status === '未上报'
                            ? 'danger'
                            : scope.row.status === '分析中'
                              ? 'warning'
                              : 'info'
                      "
                      size="small"
                    >
                      {{ scope.row.status }}
                    </el-tag>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="submitTime"
                  label="提交时间"
                  width="150"
                  align="center"
                ></el-table-column>
                <el-table-column prop="warningLevel" label="预警等级" width="100" align="center">
                  <template slot-scope="scope">
                    <el-tag v-if="scope.row.warningLevel === '正常'" type="success" size="small">
                      正常
                    </el-tag>
                    <el-tag
                      v-else-if="scope.row.warningLevel === '必要关注'"
                      type="success"
                      size="small"
                    >
                      必要关注
                    </el-tag>
                    <el-tag
                      v-else-if="scope.row.warningLevel === '一级预警'"
                      type="warning"
                      size="small"
                    >
                      一级预警
                    </el-tag>
                    <el-tag
                      v-else-if="scope.row.warningLevel === '二级预警'"
                      type="warning"
                      size="small"
                    >
                      二级预警
                    </el-tag>
                    <el-tag
                      v-else-if="scope.row.warningLevel === '三级预警'"
                      type="danger"
                      size="small"
                    >
                      三级预警
                    </el-tag>
                    <span v-else>-</span>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="criminalRecord"
                  label="犯罪情况查询"
                  width="120"
                  align="center"
                >
                  <template slot-scope="scope">
                    <span v-if="scope.row.criminalRecord === '有'" class="warning-text">有</span>
                    <span v-else>无</span>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="insuranceIntermediary"
                  label="保险中介从业"
                  width="120"
                  align="center"
                >
                  <template slot-scope="scope">
                    <span v-if="scope.row.insuranceIntermediary === '有'" class="warning-text">
                      有
                    </span>
                    <span v-else>无</span>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="enforcementInfo"
                  label="被执行人信息异常"
                  width="140"
                  align="center"
                >
                  <template slot-scope="scope">
                    <span v-if="scope.row.enforcementInfo === '有'" class="warning-text">有</span>
                    <span v-else>无</span>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="businessOperation"
                  label="经商办企业情况"
                  width="120"
                  align="center"
                >
                  <template slot-scope="scope">
                    <span v-if="scope.row.businessOperation === '有'" class="warning-text">有</span>
                    <span v-else>无</span>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="fraudCriminal"
                  label="造假提示(无犯罪记录)"
                  width="160"
                  align="center"
                >
                  <template slot-scope="scope">
                    <span v-if="scope.row.fraudCriminal === '有'" class="warning-text">有</span>
                    <span v-else>无</span>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="fraudBusiness"
                  label="造假提示(经商办企业)"
                  width="160"
                  align="center"
                >
                  <template slot-scope="scope">
                    <span v-if="scope.row.fraudBusiness === '有'" class="warning-text">有</span>
                    <span v-else>无</span>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="lastUrgeTime"
                  label="最后催办时间"
                  width="150"
                  align="center"
                ></el-table-column>
                <el-table-column
                  prop="urgeCount"
                  label="催办次数"
                  width="100"
                  align="center"
                ></el-table-column>
                <el-table-column
                  label="操作"
                  width="160"
                  align="center"
                  fixed="right"
                  class-name="operation-column"
                >
                  <template slot-scope="scope">
                    <div class="operation-buttons">
                      <el-button
                        v-if="scope.row.status === '已完成'"
                        type="text"
                        size="small"
                        @click="handleViewMaterials(scope.row)"
                      >
                        查看资料
                      </el-button>
                      <el-button
                        v-if="scope.row.status === '未上报'"
                        type="text"
                        size="small"
                        @click="handleUrge(scope.row)"
                      >
                        催办
                      </el-button>
                      <el-button
                        v-if="scope.row.status === '待预审'"
                        type="text"
                        size="small"
                        @click="handlePreReview(scope.row)"
                      >
                        预审
                      </el-button>
                      <el-button
                        v-if="scope.row.status === '分析中'"
                        type="text"
                        size="small"
                        @click="handleViewMaterials(scope.row)"
                      >
                        查看进度
                      </el-button>
                      <el-divider direction="vertical"></el-divider>
                      <el-button type="text" size="small" @click="handleViewUrgeHistory(scope.row)">
                        催办记录
                      </el-button>
                    </div>
                  </template>
                </el-table-column>
              </el-table>

              <!-- 分页组件 -->
              <div class="pagination-container">
                <el-pagination
                  @size-change="handleSubmissionSizeChange"
                  @current-change="handleSubmissionCurrentChange"
                  :current-page="submissionPagination.currentPage"
                  :page-sizes="[10, 20, 50, 100]"
                  :page-size="submissionPagination.pageSize"
                  layout="total, sizes, prev, pager, next, jumper"
                  :total="submissionPagination.total"
                ></el-pagination>
              </div>
            </el-card>
          </div>

          <!-- 数据统计看板页面 -->
          <div v-if="activeMenu === 'data-dashboard'">
            <!-- 页面标题 -->
            <div class="page-header">
              <h2>数据统计看板</h2>
              <div class="breadcrumb">
                <span>统计看板</span>
                <span>/</span>
                <span>数据统计看板</span>
              </div>
            </div>

            <!-- 筛选条件区域 -->
            <el-card shadow="never" style="margin-bottom: 24px">
              <div slot="header" class="clearfix">
                <span style="font-weight: 600; font-size: 16px; color: #303133">筛选条件</span>
              </div>
              <el-form :model="dashboardFilterForm" label-width="100px">
                <el-row :gutter="20">
                  <el-col :span="6">
                    <el-form-item label="发起机构">
                      <el-select
                        v-model="dashboardFilterForm.initiatingOrg"
                        placeholder="请选择发起机构"
                        clearable
                        style="width: 100%"
                      >
                        <el-option label="江苏省分行" value="江苏省分行"></el-option>
                        <el-option label="南京市分行" value="南京市分行"></el-option>
                        <el-option label="无锡市分行" value="无锡市分行"></el-option>
                        <el-option label="徐州市分行" value="徐州市分行"></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="批次">
                      <el-select
                        v-model="dashboardFilterForm.batch"
                        placeholder="请选择批次"
                        clearable
                        style="width: 100%"
                      >
                        <el-option
                          label="江苏省分行2025年第一批次"
                          value="江苏省分行2025年第一批次"
                        ></el-option>
                        <el-option
                          label="南京市分行2025年第一批次"
                          value="南京市分行2025年第一批次"
                        ></el-option>
                        <el-option
                          label="无锡市分行2025年第一批次"
                          value="无锡市分行2025年第一批次"
                        ></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="所属机构">
                      <el-popover
                        placement="bottom-start"
                        width="400"
                        trigger="click"
                        v-model="dashboardOrgPopoverVisible"
                        @show="handleDashboardOrgPopoverOpen"
                      >
                        <el-tree
                          ref="dashboardOrgTree"
                          :data="orgTreeData"
                          :props="orgTreeProps"
                          node-key="value"
                          :default-expand-all="false"
                          :expand-on-click-node="true"
                          :highlight-current="true"
                          :current-node-key="dashboardFilterForm.currentOrgKey"
                          @node-click="handleOrgTreeNodeClick"
                          style="max-height: 400px; overflow-y: auto"
                        ></el-tree>
                        <div style="text-align: right; margin-top: 10px">
                          <el-button size="mini" @click="handleDashboardOrgCancel">取消</el-button>
                          <el-button type="primary" size="mini" @click="handleDashboardOrgConfirm">
                            确定
                          </el-button>
                        </div>
                        <el-input
                          slot="reference"
                          v-model="dashboardFilterForm.selectedOrgPath"
                          placeholder="请选择所属机构"
                          readonly
                          style="cursor: pointer"
                        >
                          <i slot="suffix" class="el-input__icon el-icon-arrow-down"></i>
                        </el-input>
                      </el-popover>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="所属部门">
                      <el-select
                        v-model="dashboardFilterForm.department"
                        placeholder="请选择所属部门"
                        clearable
                        :disabled="dashboardFilterForm.isBranchSelected"
                        style="width: 100%"
                      >
                        <el-option label="市分行本部" value="市分行本部"></el-option>
                        <el-option label="风险管理部" value="风险管理部"></el-option>
                        <el-option label="个人金融部" value="个人金融部"></el-option>
                        <el-option label="公司业务部" value="公司业务部"></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row>
                  <el-col :span="24">
                    <div class="filter-buttons">
                      <el-button @click="handleDashboardReset">重置</el-button>
                      <el-button type="primary" @click="handleDashboardQuery">查询</el-button>
                    </div>
                  </el-col>
                </el-row>
              </el-form>
            </el-card>

            <!-- 统计看板区域 -->
            <div class="dashboard-container">
              <!-- 基本情况 -->
              <el-card shadow="never" style="margin-bottom: 24px">
                <div
                  slot="header"
                  class="clearfix"
                  style="
                    background-color: #ff4444;
                    color: white;
                    margin: -20px -20px 20px -20px;
                    padding: 15px 20px;
                  "
                >
                  <span style="font-weight: 600; font-size: 16px">基本情况</span>
                </div>
                <el-row :gutter="20">
                  <el-col :span="6">
                    <div class="stat-item">
                      <div class="stat-label">发起机构</div>
                      <div class="stat-value">{{ dashboardData.basicInfo.initiatingOrg }}</div>
                    </div>
                  </el-col>
                  <el-col :span="6">
                    <div class="stat-item">
                      <div class="stat-label">批次</div>
                      <div class="stat-value">{{ dashboardData.basicInfo.batch }}</div>
                    </div>
                  </el-col>
                  <el-col :span="6">
                    <div class="stat-item">
                      <div class="stat-label">所属机构</div>
                      <div class="stat-value">{{ dashboardData.basicInfo.organization }}</div>
                    </div>
                  </el-col>
                  <el-col :span="6">
                    <div class="stat-item">
                      <div class="stat-label">所属部门</div>
                      <div class="stat-value">{{ dashboardData.basicInfo.department }}</div>
                    </div>
                  </el-col>
                </el-row>
              </el-card>

              <!-- 排查情况 -->
              <el-card shadow="never" style="margin-bottom: 24px">
                <div
                  slot="header"
                  class="clearfix"
                  style="
                    background-color: #00c851;
                    color: white;
                    margin: -20px -20px 20px -20px;
                    padding: 15px 20px;
                  "
                >
                  <span style="font-weight: 600; font-size: 16px">排查情况</span>
                </div>

                <!-- 第一部分：排查进度统计 -->
                <div style="margin-bottom: 20px">
                  <h4 style="color: #00c851; margin-bottom: 15px">排查进度统计</h4>
                  <el-row :gutter="20">
                    <el-col :span="4">
                      <div class="stat-item">
                        <div class="stat-label">应排查人数</div>
                        <div class="stat-value">{{ dashboardData.checkProgress.totalCount }}</div>
                      </div>
                    </el-col>
                    <el-col :span="4">
                      <div class="stat-item">
                        <div class="stat-label">已排查人数</div>
                        <div class="stat-value">{{ dashboardData.checkProgress.checkedCount }}</div>
                      </div>
                    </el-col>
                    <el-col :span="4">
                      <div class="stat-item">
                        <div class="stat-label">未排查人数</div>
                        <div class="stat-value">
                          {{ dashboardData.checkProgress.uncheckedCount }}
                        </div>
                      </div>
                    </el-col>
                    <el-col :span="4">
                      <div class="stat-item">
                        <div class="stat-label">已核实人数</div>
                        <div class="stat-value">
                          {{ dashboardData.checkProgress.verifiedCount }}
                        </div>
                      </div>
                    </el-col>
                    <el-col :span="5">
                      <div class="stat-item has-chart">
                        <div class="stat-content">
                          <div class="stat-label">排查完成率</div>
                          <div class="stat-value">
                            {{ dashboardData.checkProgress.completionRate }}%
                          </div>
                        </div>
                        <div class="percentage-chart">
                          <div class="chart-container">
                            <div
                              class="chart-circle"
                              :style="`background: conic-gradient(#00c851 0deg ${dashboardData.checkProgress.completionRate * 3.6}deg, #e5e5e5 ${dashboardData.checkProgress.completionRate * 3.6}deg 360deg)`"
                            >
                              <div class="chart-text">
                                {{ dashboardData.checkProgress.completionRate }}%
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </el-col>
                    <el-col :span="5">
                      <div class="stat-item has-chart">
                        <div class="stat-content">
                          <div class="stat-label">核实完成率</div>
                          <div class="stat-value">
                            {{ dashboardData.checkProgress.verificationRate }}%
                          </div>
                        </div>
                        <div class="percentage-chart">
                          <div class="chart-container">
                            <div
                              class="chart-circle"
                              :style="`background: conic-gradient(#00c851 0deg ${dashboardData.checkProgress.verificationRate * 3.6}deg, #e5e5e5 ${dashboardData.checkProgress.verificationRate * 3.6}deg 360deg)`"
                            >
                              <div class="chart-text">
                                {{ dashboardData.checkProgress.verificationRate }}%
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </el-col>
                  </el-row>
                </div>

                <!-- 第二部分：排查结果统计 -->
                <div>
                  <h4 style="color: #17a2b8; margin-bottom: 15px">排查结果统计</h4>
                  <el-row :gutter="20">
                    <el-col :span="3">
                      <div class="stat-item">
                        <div class="stat-label">已排查人数</div>
                        <div class="stat-value">{{ dashboardData.checkResults.checkedCount }}</div>
                      </div>
                    </el-col>
                    <el-col :span="3">
                      <div class="stat-item">
                        <div class="stat-label">正常人数</div>
                        <div class="stat-value">{{ dashboardData.checkResults.normalCount }}</div>
                      </div>
                    </el-col>
                    <el-col :span="3">
                      <div class="stat-item">
                        <div class="stat-label">必要关注</div>
                        <div class="stat-value">
                          {{ dashboardData.checkResults.attentionCount }}
                        </div>
                      </div>
                    </el-col>
                    <el-col :span="3">
                      <div class="stat-item">
                        <div class="stat-label">一级预警</div>
                        <div class="stat-value">{{ dashboardData.checkResults.level1Warning }}</div>
                      </div>
                    </el-col>
                    <el-col :span="3">
                      <div class="stat-item">
                        <div class="stat-label">二级预警</div>
                        <div class="stat-value">{{ dashboardData.checkResults.level2Warning }}</div>
                      </div>
                    </el-col>
                    <el-col :span="3">
                      <div class="stat-item">
                        <div class="stat-label">三级预警</div>
                        <div class="stat-value">{{ dashboardData.checkResults.level3Warning }}</div>
                      </div>
                    </el-col>
                    <el-col :span="4">
                      <div class="stat-item has-chart">
                        <div class="stat-content">
                          <div class="stat-label">正常人数占比</div>
                          <div class="stat-value">{{ dashboardData.checkResults.normalRate }}%</div>
                        </div>
                        <div class="percentage-chart">
                          <div class="chart-container">
                            <div
                              class="chart-circle"
                              :style="`background: conic-gradient(#00c851 0deg ${dashboardData.checkResults.normalRate * 3.6}deg, #e5e5e5 ${dashboardData.checkResults.normalRate * 3.6}deg 360deg)`"
                            >
                              <div class="chart-text">
                                {{ dashboardData.checkResults.normalRate }}%
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </el-col>
                    <el-col :span="4">
                      <div class="stat-item has-chart">
                        <div class="stat-content">
                          <div class="stat-label">必要关注占比</div>
                          <div class="stat-value">
                            {{ dashboardData.checkResults.attentionRate }}%
                          </div>
                        </div>
                        <div class="percentage-chart">
                          <div class="chart-container">
                            <div
                              class="chart-circle"
                              :style="`background: conic-gradient(#ffa500 0deg ${dashboardData.checkResults.attentionRate * 3.6}deg, #e5e5e5 ${dashboardData.checkResults.attentionRate * 3.6}deg 360deg)`"
                            >
                              <div class="chart-text">
                                {{ dashboardData.checkResults.attentionRate }}%
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </el-col>
                    <el-col :span="4">
                      <div class="stat-item has-chart">
                        <div class="stat-content">
                          <div class="stat-label">预警人数占比</div>
                          <div class="stat-value">
                            {{ dashboardData.checkResults.warningRate }}%
                          </div>
                        </div>
                        <div class="percentage-chart">
                          <div class="chart-container">
                            <div
                              class="chart-circle"
                              :style="`background: conic-gradient(#ff4444 0deg ${dashboardData.checkResults.warningRate * 3.6}deg, #e5e5e5 ${dashboardData.checkResults.warningRate * 3.6}deg 360deg)`"
                            >
                              <div class="chart-text">
                                {{ dashboardData.checkResults.warningRate }}%
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </el-col>
                  </el-row>
                </div>
              </el-card>

              <!-- 信用报告积分情况 -->
              <el-card shadow="never" style="margin-bottom: 24px">
                <div
                  slot="header"
                  class="clearfix"
                  style="
                    background-color: #00c851;
                    color: white;
                    margin: -20px -20px 20px -20px;
                    padding: 15px 20px;
                  "
                >
                  <span style="font-weight: 600; font-size: 16px">信用报告积分情况</span>
                </div>

                <el-row :gutter="20">
                  <el-col :span="3">
                    <div class="stat-item">
                      <div class="stat-label">信用报告均分</div>
                      <div class="stat-value">{{ dashboardData.creditScore.averageScore }}</div>
                    </div>
                  </el-col>
                  <el-col :span="3">
                    <div class="stat-item">
                      <div class="stat-label">账户数积分</div>
                      <div class="stat-value">{{ dashboardData.creditScore.accountScore }}</div>
                    </div>
                  </el-col>
                  <el-col :span="3">
                    <div class="stat-item">
                      <div class="stat-label">信用卡积分</div>
                      <div class="stat-value">{{ dashboardData.creditScore.creditCardScore }}</div>
                    </div>
                  </el-col>
                  <el-col :span="3">
                    <div class="stat-item">
                      <div class="stat-label">贷款积分</div>
                      <div class="stat-value">{{ dashboardData.creditScore.loanScore }}</div>
                    </div>
                  </el-col>
                  <el-col :span="3">
                    <div class="stat-item">
                      <div class="stat-label long-text">相关还款责任信息积分</div>
                      <div class="stat-value">{{ dashboardData.creditScore.repaymentScore }}</div>
                    </div>
                  </el-col>
                  <el-col :span="3">
                    <div class="stat-item">
                      <div class="stat-label">记录信息积分</div>
                      <div class="stat-value">{{ dashboardData.creditScore.recordScore }}</div>
                    </div>
                  </el-col>
                  <el-col :span="3">
                    <div class="stat-item">
                      <div class="stat-label">查询记录积分</div>
                      <div class="stat-value">{{ dashboardData.creditScore.queryScore }}</div>
                    </div>
                  </el-col>
                  <el-col :span="3">
                    <div class="stat-item">
                      <div class="stat-label">账户对比情况积分</div>
                      <div class="stat-value">{{ dashboardData.creditScore.comparisonScore }}</div>
                    </div>
                  </el-col>
                </el-row>
              </el-card>

              <!-- 其他画像情况 -->
              <el-card shadow="never" style="margin-bottom: 24px">
                <div
                  slot="header"
                  class="clearfix"
                  style="
                    background-color: #17a2b8;
                    color: white;
                    margin: -20px -20px 20px -20px;
                    padding: 15px 20px;
                  "
                >
                  <span style="font-weight: 600; font-size: 16px">其他画像情况</span>
                </div>

                <!-- 第一部分：其他画像数量统计 -->
                <div style="margin-bottom: 20px">
                  <h4 style="color: #17a2b8; margin-bottom: 15px">其他画像数量统计</h4>
                  <el-row :gutter="20">
                    <el-col :span="4">
                      <div class="stat-item">
                        <div class="stat-label long-text">犯罪情况查询数</div>
                        <div class="stat-value">
                          {{ dashboardData.otherProfile.criminalQueryCount }}
                        </div>
                      </div>
                    </el-col>
                    <el-col :span="4">
                      <div class="stat-item">
                        <div class="stat-label long-text">保险中介从业数</div>
                        <div class="stat-value">
                          {{ dashboardData.otherProfile.insuranceCount }}
                        </div>
                      </div>
                    </el-col>
                    <el-col :span="4">
                      <div class="stat-item">
                        <div class="stat-label long-text">被执行人信息异常数</div>
                        <div class="stat-value">
                          {{ dashboardData.otherProfile.enforcementCount }}
                        </div>
                      </div>
                    </el-col>
                    <el-col :span="4">
                      <div class="stat-item">
                        <div class="stat-label">经商办企业数</div>
                        <div class="stat-value">{{ dashboardData.otherProfile.businessCount }}</div>
                      </div>
                    </el-col>
                    <el-col :span="4">
                      <div class="stat-item">
                        <div class="stat-label very-long-text">造假提示数(无犯罪记录截图造假)</div>
                        <div class="stat-value">
                          {{ dashboardData.otherProfile.fraudCriminalCount }}
                        </div>
                      </div>
                    </el-col>
                    <el-col :span="4">
                      <div class="stat-item">
                        <div class="stat-label very-long-text">造假提示数(经商办企业截图造假)</div>
                        <div class="stat-value">
                          {{ dashboardData.otherProfile.fraudBusinessCount }}
                        </div>
                      </div>
                    </el-col>
                  </el-row>
                </div>

                <!-- 第二部分：其他画像占比统计 -->
                <div>
                  <h4 style="color: #00c851; margin-bottom: 15px">其他画像占比统计</h4>
                  <el-row :gutter="20">
                    <el-col :span="4">
                      <div class="stat-item">
                        <div class="stat-label long-text">犯罪情况查询占比</div>
                        <div class="stat-value">
                          {{ dashboardData.otherProfile.criminalQueryRate }}%
                        </div>
                      </div>
                    </el-col>
                    <el-col :span="4">
                      <div class="stat-item">
                        <div class="stat-label long-text">保险中介从业占比</div>
                        <div class="stat-value">
                          {{ dashboardData.otherProfile.insuranceRate }}%
                        </div>
                      </div>
                    </el-col>
                    <el-col :span="4">
                      <div class="stat-item">
                        <div class="stat-label long-text">被执行人信息异常占比</div>
                        <div class="stat-value">
                          {{ dashboardData.otherProfile.enforcementRate }}%
                        </div>
                      </div>
                    </el-col>
                    <el-col :span="4">
                      <div class="stat-item">
                        <div class="stat-label">经商办企业占比</div>
                        <div class="stat-value">{{ dashboardData.otherProfile.businessRate }}%</div>
                      </div>
                    </el-col>
                    <el-col :span="4">
                      <div class="stat-item">
                        <div class="stat-label very-long-text">
                          造假提示(无犯罪记录截图造假)占比
                        </div>
                        <div class="stat-value">
                          {{ dashboardData.otherProfile.fraudCriminalRate }}%
                        </div>
                      </div>
                    </el-col>
                    <el-col :span="4">
                      <div class="stat-item">
                        <div class="stat-label very-long-text">
                          造假提示(经商办企业截图造假)占比
                        </div>
                        <div class="stat-value">
                          {{ dashboardData.otherProfile.fraudBusinessRate }}%
                        </div>
                      </div>
                    </el-col>
                  </el-row>
                </div>
              </el-card>
            </div>
          </div>

          <!-- 排查批次管理页面 -->
          <div v-if="activeMenu === 'batch-management'" :key="'batch-management'">
            <!-- 页面标题 -->
            <div class="page-header">
              <h2>排查批次管理</h2>
              <div class="breadcrumb">
                <span>统计</span>
                <span>/</span>
                <span>排查批次管理</span>
              </div>
            </div>

            <!-- 批次列表 -->
            <el-card class="batch-card" shadow="never">
              <div slot="header" class="clearfix">
                <span style="font-weight: 600; font-size: 16px; color: #303133">批次列表</span>
                <div style="float: right">
                  <el-button type="primary" size="small" @click="showAddBatchDialog">
                    <i class="el-icon-plus"></i>
                    新增批次
                  </el-button>
                  <el-button size="small" @click="loadBatchData">
                    <i class="el-icon-refresh"></i>
                    刷新
                  </el-button>
                </div>
              </div>

              <!-- 批次表格 -->
              <el-table
                :data="batchList"
                v-loading="batchLoading"
                style="width: 100%"
                @selection-change="handleBatchSelectionChange"
                :key="'batch-table-' + activeMenu"
              >
                <el-table-column type="selection" width="55" align="center"></el-table-column>
                <el-table-column prop="id" label="序号" width="80" align="center"></el-table-column>
                <el-table-column prop="name" label="批次名称" min-width="200">
                  <template slot-scope="scope">
                    <span style="font-weight: 500">{{ scope.row.name }}</span>
                  </template>
                </el-table-column>
                <el-table-column prop="organization" label="发起机构" width="150"></el-table-column>
                <el-table-column prop="creator" label="发起人" width="120"></el-table-column>
                <el-table-column prop="createTime" label="创建时间" width="160"></el-table-column>
                <el-table-column prop="startTime" label="开始时间" width="120"></el-table-column>
                <el-table-column prop="endTime" label="结束时间" width="120"></el-table-column>
                <el-table-column prop="status" label="批次状态" width="100" align="center">
                  <template slot-scope="scope">
                    <el-tag
                      :type="scope.row.status === '进行中' ? 'success' : scope.row.status === '已结束' ? 'info' : 'warning'"
                      size="small"
                    >
                      {{ scope.row.status }}
                    </el-tag>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="employeeCount"
                  label="参与员工数"
                  width="100"
                  align="center"
                ></el-table-column>
                <el-table-column
                  prop="completedCount"
                  label="已完成数"
                  width="100"
                  align="center"
                ></el-table-column>
                <el-table-column
                  prop="pendingCount"
                  label="待完成数"
                  width="100"
                  align="center"
                ></el-table-column>
                <el-table-column prop="warningCount" label="预警人数" width="100" align="center">
                  <template slot-scope="scope">
                    <span style="color: #f56c6c; font-weight: 500">
                      {{ scope.row.warningCount }}
                    </span>
                  </template>
                </el-table-column>
                <el-table-column
                  label="操作"
                  width="180"
                  align="center"
                  fixed="right"
                  class-name="operation-column"
                >
                  <template slot-scope="scope">
                    <div class="operation-buttons">
                      <el-button type="text" size="small" @click="viewBatchDetail(scope.row)">
                        查看详情
                      </el-button>
                      <el-button
                        type="text"
                        size="small"
                        @click="editBatch(scope.row)"
                        v-if="scope.row.status === '进行中'"
                      >
                        编辑
                      </el-button>
                      <el-button
                        type="text"
                        size="small"
                        @click="endBatch(scope.row)"
                        v-if="scope.row.status === '进行中'"
                        style="color: #f56c6c"
                      >
                        结束排查
                      </el-button>
                    </div>
                  </template>
                </el-table-column>
              </el-table>

              <!-- 分页 -->
              <div style="margin-top: 20px; text-align: right">
                <el-pagination
                  @size-change="handleBatchSizeChange"
                  @current-change="handleBatchCurrentChange"
                  :current-page="batchCurrentPage"
                  :page-sizes="[10, 20, 50, 100]"
                  :page-size="batchPageSize"
                  layout="total, sizes, prev, pager, next, jumper"
                  :total="batchTotal"
                ></el-pagination>
              </div>
            </el-card>

            <!-- 新增批次弹窗 -->
            <el-dialog
              title="新增批次"
              :visible.sync="addBatchDialogVisible"
              width="600px"
              :close-on-click-modal="false"
            >
              <el-form
                :model="addBatchForm"
                :rules="addBatchRules"
                ref="addBatchForm"
                label-width="120px"
              >
                <el-form-item label="批次名称" prop="name">
                  <el-input
                    v-model="addBatchForm.name"
                    placeholder="如：南京市分行2025年第一批次"
                  ></el-input>
                </el-form-item>
                <el-form-item label="发起机构" prop="organization">
                  <el-input v-model="addBatchForm.organization" :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="发起人" prop="creator">
                  <el-input v-model="addBatchForm.creator" :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="开始时间" prop="startTime">
                  <el-date-picker
                    v-model="addBatchForm.startTime"
                    type="date"
                    placeholder="选择开始时间"
                    style="width: 100%"
                    value-format="yyyy-MM-dd"
                  ></el-date-picker>
                </el-form-item>
                <el-form-item label="结束时间" prop="endTime">
                  <el-date-picker
                    v-model="addBatchForm.endTime"
                    type="date"
                    placeholder="选择结束时间（可选）"
                    style="width: 100%"
                    value-format="yyyy-MM-dd"
                  ></el-date-picker>
                </el-form-item>
                <el-form-item label="排查说明" prop="description">
                  <el-input
                    v-model="addBatchForm.description"
                    type="textarea"
                    :rows="3"
                    placeholder="请输入排查任务的说明信息"
                  ></el-input>
                </el-form-item>
                <el-form-item label="参与名单" prop="participantList">
                  <el-upload
                    class="upload-demo"
                    drag
                    action="#"
                    :auto-upload="false"
                    :on-change="handleFileChange"
                    :file-list="addBatchForm.participantList"
                    accept=".xlsx,.xls"
                  >
                    <i class="el-icon-upload"></i>
                    <div class="el-upload__text">
                      将文件拖到此处，或
                      <em>点击上传</em>
                    </div>
                    <div class="el-upload__tip" slot="tip">只能上传Excel文件，且不超过10MB</div>
                  </el-upload>
                </el-form-item>
                <el-form-item label="收集资料" prop="materials">
                  <el-select
                    v-model="addBatchForm.materials"
                    multiple
                    placeholder="请选择需要收集的材料类型"
                    style="width: 100%"
                  >
                    <el-option label="征信报告申请回执" value="征信报告申请回执"></el-option>
                    <el-option label="无犯罪记录证明" value="无犯罪记录证明"></el-option>
                    <el-option label="经商办企业情况截图" value="经商办企业情况截图"></el-option>
                    <el-option label="保险从业情况截图" value="保险从业情况截图"></el-option>
                    <el-option label="法院涉诉情况截图" value="法院涉诉情况截图"></el-option>
                  </el-select>
                </el-form-item>
              </el-form>
              <div slot="footer" class="dialog-footer">
                <el-button @click="addBatchDialogVisible = false">取消</el-button>
                <el-button type="primary" @click="handleAddBatch">确定</el-button>
              </div>
            </el-dialog>

            <!-- 编辑批次弹窗 -->
            <el-dialog
              title="编辑批次"
              :visible.sync="editBatchDialogVisible"
              width="600px"
              :close-on-click-modal="false"
            >
              <el-form
                :model="editBatchForm"
                :rules="editBatchRules"
                ref="editBatchForm"
                label-width="120px"
              >
                <el-form-item label="批次名称" prop="name">
                  <el-input v-model="editBatchForm.name"></el-input>
                </el-form-item>
                <el-form-item label="结束时间" prop="endTime">
                  <el-date-picker
                    v-model="editBatchForm.endTime"
                    type="date"
                    placeholder="选择结束时间"
                    style="width: 100%"
                    value-format="yyyy-MM-dd"
                  ></el-date-picker>
                </el-form-item>
                <el-form-item label="排查说明" prop="description">
                  <el-input
                    v-model="editBatchForm.description"
                    type="textarea"
                    :rows="3"
                    placeholder="请输入排查任务的说明信息"
                  ></el-input>
                </el-form-item>
                <el-form-item label="批次状态" prop="status">
                  <el-select v-model="editBatchForm.status" style="width: 100%">
                    <el-option label="进行中" value="进行中"></el-option>
                    <el-option label="已暂停" value="已暂停"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="修改原因" prop="reason">
                  <el-input
                    v-model="editBatchForm.reason"
                    type="textarea"
                    :rows="2"
                    placeholder="请说明修改原因"
                  ></el-input>
                </el-form-item>
              </el-form>
              <div slot="footer" class="dialog-footer">
                <el-button @click="editBatchDialogVisible = false">取消</el-button>
                <el-button type="primary" @click="handleEditBatch">确定</el-button>
              </div>
            </el-dialog>

            <!-- 批次详情弹窗 -->
            <el-dialog
              title="批次详情"
              :visible.sync="batchDetailDialogVisible"
              width="800px"
              :close-on-click-modal="false"
            >
              <div v-if="currentBatchDetail">
                <!-- 基本信息 -->
                <el-card class="detail-card" shadow="never">
                  <div slot="header">
                    <span style="font-weight: 600">基本信息</span>
                  </div>
                  <el-row :gutter="20">
                    <el-col :span="12">
                      <div class="detail-item">
                        <span class="detail-label">批次名称：</span>
                        <span class="detail-value">{{ currentBatchDetail.name }}</span>
                      </div>
                    </el-col>
                    <el-col :span="12">
                      <div class="detail-item">
                        <span class="detail-label">发起机构：</span>
                        <span class="detail-value">{{ currentBatchDetail.organization }}</span>
                      </div>
                    </el-col>
                  </el-row>
                  <el-row :gutter="20">
                    <el-col :span="12">
                      <div class="detail-item">
                        <span class="detail-label">发起人：</span>
                        <span class="detail-value">{{ currentBatchDetail.creator }}</span>
                      </div>
                    </el-col>
                    <el-col :span="12">
                      <div class="detail-item">
                        <span class="detail-label">创建时间：</span>
                        <span class="detail-value">{{ currentBatchDetail.createTime }}</span>
                      </div>
                    </el-col>
                  </el-row>
                </el-card>

                <!-- 时间信息 -->
                <el-card class="detail-card" shadow="never">
                  <div slot="header">
                    <span style="font-weight: 600">时间信息</span>
                  </div>
                  <el-row :gutter="20">
                    <el-col :span="8">
                      <div class="detail-item">
                        <span class="detail-label">开始时间：</span>
                        <span class="detail-value">{{ currentBatchDetail.startTime }}</span>
                      </div>
                    </el-col>
                    <el-col :span="8">
                      <div class="detail-item">
                        <span class="detail-label">结束时间：</span>
                        <span class="detail-value">
                          {{ currentBatchDetail.endTime || '未设置' }}
                        </span>
                      </div>
                    </el-col>
                    <el-col :span="8">
                      <div class="detail-item">
                        <span class="detail-label">持续时间：</span>
                        <span class="detail-value">{{ getDuration(currentBatchDetail) }}</span>
                      </div>
                    </el-col>
                  </el-row>
                </el-card>

                <!-- 参与统计 -->
                <el-card class="detail-card" shadow="never">
                  <div slot="header">
                    <span style="font-weight: 600">参与统计</span>
                  </div>
                  <el-row :gutter="20">
                    <el-col :span="6">
                      <div class="stat-item">
                        <div class="stat-number">{{ currentBatchDetail.employeeCount }}</div>
                        <div class="stat-label">参与员工数</div>
                      </div>
                    </el-col>
                    <el-col :span="6">
                      <div class="stat-item">
                        <div class="stat-number success">
                          {{ currentBatchDetail.completedCount }}
                        </div>
                        <div class="stat-label">已完成数</div>
                      </div>
                    </el-col>
                    <el-col :span="6">
                      <div class="stat-item">
                        <div class="stat-number warning">{{ currentBatchDetail.pendingCount }}</div>
                        <div class="stat-label">待完成数</div>
                      </div>
                    </el-col>
                    <el-col :span="6">
                      <div class="stat-item">
                        <div class="stat-number danger">{{ currentBatchDetail.warningCount }}</div>
                        <div class="stat-label">预警人数</div>
                      </div>
                    </el-col>
                  </el-row>
                </el-card>

                <!-- 预警统计 -->
                <el-card class="detail-card" shadow="never">
                  <div slot="header">
                    <span style="font-weight: 600">预警统计</span>
                  </div>
                  <el-row :gutter="20">
                    <el-col :span="6">
                      <div class="warning-item">
                        <el-tag type="success" size="small">正常</el-tag>
                        <span class="warning-count">
                          {{ currentBatchDetail.employeeCount - currentBatchDetail.warningCount }}
                        </span>
                      </div>
                    </el-col>
                    <el-col :span="6">
                      <div class="warning-item">
                        <el-tag type="success" size="small">必要关注</el-tag>
                        <span class="warning-count">
                          {{ Math.floor(currentBatchDetail.warningCount * 0.3) }}
                        </span>
                      </div>
                    </el-col>
                    <el-col :span="6">
                      <div class="warning-item">
                        <el-tag type="warning" size="small">一级预警</el-tag>
                        <span class="warning-count">
                          {{ Math.floor(currentBatchDetail.warningCount * 0.4) }}
                        </span>
                      </div>
                    </el-col>
                    <el-col :span="6">
                      <div class="warning-item">
                        <el-tag type="warning" size="small">二级预警</el-tag>
                        <span class="warning-count">
                          {{ Math.floor(currentBatchDetail.warningCount * 0.2) }}
                        </span>
                      </div>
                    </el-col>
                  </el-row>
                  <el-row :gutter="20" style="margin-top: 16px">
                    <el-col :span="6">
                      <div class="warning-item">
                        <el-tag type="danger" size="small">三级预警</el-tag>
                        <span class="warning-count">
                          {{ Math.floor(currentBatchDetail.warningCount * 0.1) }}
                        </span>
                      </div>
                    </el-col>
                  </el-row>
                </el-card>
              </div>
              <div slot="footer" class="dialog-footer">
                <el-button @click="batchDetailDialogVisible = false">关闭</el-button>
                <el-button type="primary" @click="exportBatchEmployeeList">导出员工清单</el-button>
              </div>
            </el-dialog>
          </div>

          <!-- 台账明细管理页面 -->
          <div v-if="activeMenu === 'ledger-management'">
            <!-- 页面标题 -->
            <div class="page-header">
              <h2>台账明细管理</h2>
              <div class="breadcrumb">
                <span>统计</span>
                <span>/</span>
                <span>台账明细管理</span>
              </div>
            </div>

            <!-- 筛选区域卡片 -->
            <el-card shadow="never" style="margin-bottom: 24px">
              <div slot="header" class="clearfix">
                <span style="font-weight: 600; font-size: 16px; color: #303133">年度</span>
              </div>
              <el-form :model="filterForm" label-width="100px">
                <el-row :gutter="20">
                  <el-col :span="6">
                    <el-form-item label="年度">
                      <el-select
                        v-model="filterForm.yearBatch"
                        multiple
                        placeholder="请选择年度"
                        clearable
                        style="width: 100%"
                      >
                        <el-option label="2025年" value="2025年"></el-option>
                        <el-option label="2024年" value="2024年"></el-option>
                        <el-option label="2023年" value="2023年"></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="批次">
                      <el-select
                        v-model="filterForm.batch"
                        multiple
                        placeholder="请选择批次"
                        clearable
                        style="width: 100%"
                      >
                        <el-option
                          label="南京市分行2025年第一批次"
                          value="2025年第一季度"
                        ></el-option>
                        <el-option
                          label="江苏省分行2024年第四批次"
                          value="2024年第四季度"
                        ></el-option>
                        <el-option
                          label="江苏省分行2024年第三批次"
                          value="2024年第三季度"
                        ></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="查询日期">
                      <el-date-picker
                        v-model="filterForm.dateRange"
                        type="daterange"
                        range-separator="至"
                        start-placeholder="开始日期"
                        end-placeholder="结束日期"
                        value-format="yyyy-MM-dd"
                        style="width: 100%"
                      ></el-date-picker>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="所属机构">
                      <el-popover
                        placement="bottom-start"
                        width="400"
                        trigger="click"
                        v-model="ledgerOrgPopoverVisible"
                        @show="handleLedgerOrgPopoverOpen"
                      >
                        <el-tree
                          ref="ledgerOrgTree"
                          :data="orgTreeData"
                          :props="orgTreeProps"
                          node-key="value"
                          :default-expand-all="false"
                          :expand-on-click-node="true"
                          :highlight-current="true"
                          :current-node-key="filterForm.currentOrgKey"
                          @node-click="handleLedgerOrgTreeNodeClick"
                          style="max-height: 400px; overflow-y: auto"
                        ></el-tree>
                        <div style="text-align: right; margin-top: 10px">
                          <el-button size="mini" @click="handleLedgerOrgCancel">取消</el-button>
                          <el-button type="primary" size="mini" @click="handleLedgerOrgConfirm">
                            确定
                          </el-button>
                        </div>
                        <el-input
                          slot="reference"
                          v-model="filterForm.selectedOrgPath"
                          placeholder="请选择所属机构"
                          readonly
                          style="cursor: pointer"
                        >
                          <i slot="suffix" class="el-input__icon el-icon-arrow-down"></i>
                        </el-input>
                      </el-popover>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row :gutter="20">
                  <el-col :span="6">
                    <el-form-item label="所属部门">
                      <el-select
                        v-model="filterForm.department"
                        placeholder="请选择部门"
                        clearable
                        :disabled="filterForm.isBranchSelected"
                        style="width: 100%"
                      >
                        <el-option label="风险管理部" value="风险管理部"></el-option>
                        <el-option label="个人金融部" value="个人金融部"></el-option>
                        <el-option label="公司业务部" value="公司业务部"></el-option>
                        <el-option label="信贷管理部" value="信贷管理部"></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="预警等级">
                      <el-select
                        v-model="filterForm.warningLevel"
                        multiple
                        placeholder="请选择预警等级"
                        clearable
                        style="width: 100%"
                      >
                        <el-option label="正常" value="0"></el-option>
                        <el-option label="必要关注" value="1"></el-option>
                        <el-option label="一级预警" value="2"></el-option>
                        <el-option label="二级预警" value="3"></el-option>
                        <el-option label="三级预警" value="4"></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="是否核实">
                      <el-select
                        v-model="filterForm.verified"
                        placeholder="请选择是否核实"
                        clearable
                        style="width: 100%"
                      >
                        <el-option label="已核实" value="1"></el-option>
                        <el-option label="未核实" value="0"></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="姓名">
                      <el-input
                        v-model="filterForm.name"
                        placeholder="请输入姓名"
                        clearable
                        style="width: 100%"
                      ></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row :gutter="20">
                  <el-col :span="6">
                    <el-form-item label="工号">
                      <el-input
                        v-model="filterForm.employeeId"
                        placeholder="请输入工号"
                        clearable
                        style="width: 100%"
                      ></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row>
                  <el-col :span="24">
                    <div class="filter-buttons">
                      <el-button @click="handleReset">重置</el-button>
                      <el-button type="primary" @click="handleQuery">查询</el-button>
                    </div>
                  </el-col>
                </el-row>
              </el-form>
            </el-card>

            <!-- 台账数据卡片 -->
            <el-card shadow="never">
              <div slot="header" class="clearfix">
                <span style="font-weight: 600; font-size: 16px; color: #303133">台账数据</span>
                <div style="float: right">
                  <el-button size="small" @click="handleRefresh">
                    <i class="el-icon-refresh"></i>
                    刷新
                  </el-button>
                  <el-button size="small" type="primary" @click="handleExport">
                    <i class="el-icon-download"></i>
                    导出
                  </el-button>
                </div>
              </div>

              <!-- 数据表格 -->
              <el-table
                :data="tableData"
                border
                style="width: 100%"
                @selection-change="handleSelectionChange"
              >
                <!-- 选择框 -->
                <el-table-column type="selection" width="55" fixed></el-table-column>

                <!-- 固定列 -->
                <el-table-column prop="序号" label="序号" width="80" fixed></el-table-column>
                <el-table-column prop="姓名" label="姓名" width="100" fixed></el-table-column>
                <el-table-column prop="批次" label="批次" width="150"></el-table-column>
                <el-table-column prop="查询日期" label="查询日期" width="120"></el-table-column>

                <!-- 基础信息 -->
                <el-table-column prop="工号" label="工号" width="120"></el-table-column>
                <el-table-column prop="所属机构" label="所属机构" width="200"></el-table-column>
                <el-table-column prop="所属部门" label="所属部门" width="150"></el-table-column>
                <el-table-column prop="征信分数" label="征信分数" width="100">
                  <template slot-scope="scope">
                    <div class="editable-cell" @click="handleEdit(scope.row, '征信分数')">
                      {{ scope.row.征信分数 }}
                      <i class="el-icon-edit edit-icon"></i>
                    </div>
                  </template>
                </el-table-column>
                <el-table-column prop="预警等级" label="预警等级" width="120">
                  <template slot-scope="scope">
                    <div class="editable-cell" @click="handleEdit(scope.row, '预警等级')">
                      <span class="warning-badge" :class="getWarningClass(scope.row.预警等级)">
                        {{ getWarningText(scope.row.预警等级) }}
                      </span>
                      <i class="el-icon-edit edit-icon"></i>
                    </div>
                  </template>
                </el-table-column>
                <el-table-column prop="核实状态" label="核实状态" width="120">
                  <template slot-scope="scope">
                    <div class="editable-cell" @click="handleEdit(scope.row, '核实状态')">
                      <span
                        class="verification-badge"
                        :class="getVerificationStatusClass(scope.row.预警等级)"
                      >
                        {{ getVerificationStatus(scope.row.预警等级) }}
                      </span>
                      <i class="el-icon-edit edit-icon"></i>
                    </div>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="上一期征信分数"
                  label="上一期征信分数"
                  width="140"
                ></el-table-column>

                <!-- 账户数情况 -->
                <el-table-column label="账户数情况" align="center">
                  <!-- 总账户数 -->
                  <el-table-column label="总账户数" align="center">
                    <el-table-column prop="总账户数_购房贷款" label="购房贷款" width="100">
                      <template slot-scope="scope">
                        <div
                          class="editable-cell"
                          @click="handleEdit(scope.row, '总账户数_购房贷款')"
                        >
                          {{ scope.row.总账户数_购房贷款 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="总账户数_其他贷款" label="其他贷款" width="100">
                      <template slot-scope="scope">
                        <div
                          class="editable-cell"
                          @click="handleEdit(scope.row, '总账户数_其他贷款')"
                        >
                          {{ scope.row.总账户数_其他贷款 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="总账户数_其他业务" label="其他业务" width="100">
                      <template slot-scope="scope">
                        <div
                          class="editable-cell"
                          @click="handleEdit(scope.row, '总账户数_其他业务')"
                        >
                          {{ scope.row.总账户数_其他业务 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                  </el-table-column>

                  <!-- 未结清/未销户账户数 -->
                  <el-table-column label="未结清/未销户账户数" align="center">
                    <el-table-column prop="未结清_信用卡" label="信用卡" width="100">
                      <template slot-scope="scope">
                        <div class="editable-cell" @click="handleEdit(scope.row, '未结清_信用卡')">
                          {{ scope.row.未结清_信用卡 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="未结清_购房贷款" label="购房贷款" width="110">
                      <template slot-scope="scope">
                        <div
                          class="editable-cell"
                          @click="handleEdit(scope.row, '未结清_购房贷款')"
                        >
                          {{ scope.row.未结清_购房贷款 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="未结清_其他贷款" label="其他贷款" width="110">
                      <template slot-scope="scope">
                        <div
                          class="editable-cell"
                          @click="handleEdit(scope.row, '未结清_其他贷款')"
                        >
                          {{ scope.row.未结清_其他贷款 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="未结清_其他业务" label="其他业务" width="110">
                      <template slot-scope="scope">
                        <div
                          class="editable-cell"
                          @click="handleEdit(scope.row, '未结清_其他业务')"
                        >
                          {{ scope.row.未结清_其他业务 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                  </el-table-column>

                  <!-- 发生过逾期的账户数 -->
                  <el-table-column label="发生过逾期的账户数" align="center">
                    <el-table-column prop="逾期_信用卡" label="信用卡" width="100">
                      <template slot-scope="scope">
                        <div class="editable-cell" @click="handleEdit(scope.row, '逾期_信用卡')">
                          {{ scope.row.逾期_信用卡 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="逾期_购房贷款" label="购房贷款" width="110">
                      <template slot-scope="scope">
                        <div class="editable-cell" @click="handleEdit(scope.row, '逾期_购房贷款')">
                          {{ scope.row.逾期_购房贷款 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="逾期_其他贷款" label="其他贷款" width="110">
                      <template slot-scope="scope">
                        <div class="editable-cell" @click="handleEdit(scope.row, '逾期_其他贷款')">
                          {{ scope.row.逾期_其他贷款 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="逾期_其他业务" label="其他业务" width="110">
                      <template slot-scope="scope">
                        <div class="editable-cell" @click="handleEdit(scope.row, '逾期_其他业务')">
                          {{ scope.row.逾期_其他业务 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                  </el-table-column>

                  <!-- 发生过90天以上逾期的账户数 -->
                  <el-table-column label="发生过90天以上逾期的账户数" align="center">
                    <el-table-column prop="逾期90天_信用卡" label="信用卡" width="100">
                      <template slot-scope="scope">
                        <div
                          class="editable-cell"
                          @click="handleEdit(scope.row, '逾期90天_信用卡')"
                        >
                          {{ scope.row.逾期90天_信用卡 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="逾期90天_购房贷款" label="购房贷款" width="110">
                      <template slot-scope="scope">
                        <div
                          class="editable-cell"
                          @click="handleEdit(scope.row, '逾期90天_购房贷款')"
                        >
                          {{ scope.row.逾期90天_购房贷款 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="逾期90天_其他贷款" label="其他贷款" width="110">
                      <template slot-scope="scope">
                        <div
                          class="editable-cell"
                          @click="handleEdit(scope.row, '逾期90天_其他贷款')"
                        >
                          {{ scope.row.逾期90天_其他贷款 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="逾期90天_其他业务" label="其他业务" width="110">
                      <template slot-scope="scope">
                        <div
                          class="editable-cell"
                          @click="handleEdit(scope.row, '逾期90天_其他业务')"
                        >
                          {{ scope.row.逾期90天_其他业务 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                  </el-table-column>
                </el-table-column>

                <!-- 信用卡情况 -->
                <el-table-column label="信用卡情况" align="center">
                  <!-- 信用卡 -->
                  <el-table-column label="信用卡" align="center">
                    <el-table-column prop="信用卡_信用额度" label="信用额度(元)" width="120">
                      <template slot-scope="scope">
                        <div
                          class="editable-cell"
                          @click="handleEdit(scope.row, '信用卡_信用额度')"
                        >
                          {{ scope.row.信用卡_信用额度 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="信用卡_已使用额度" label="已使用额度(元)" width="130">
                      <template slot-scope="scope">
                        <div
                          class="editable-cell"
                          @click="handleEdit(scope.row, '信用卡_已使用额度')"
                        >
                          {{ scope.row.信用卡_已使用额度 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="信用卡_分期余额" label="分期余额(元)" width="120">
                      <template slot-scope="scope">
                        <div
                          class="editable-cell"
                          @click="handleEdit(scope.row, '信用卡_分期余额')"
                        >
                          {{ scope.row.信用卡_分期余额 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                  </el-table-column>

                  <!-- 发生逾期贷记卡账户 -->
                  <el-table-column label="(一)发生逾期贷记卡账户" align="center">
                    <el-table-column prop="逾期贷记卡_信用额度" label="信用额度(元)" width="120">
                      <template slot-scope="scope">
                        <div
                          class="editable-cell"
                          @click="handleEdit(scope.row, '逾期贷记卡_信用额度')"
                        >
                          {{ scope.row.逾期贷记卡_信用额度 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="逾期贷记卡_余额" label="逾期情况(元)" width="120">
                      <template slot-scope="scope">
                        <div
                          class="editable-cell"
                          @click="handleEdit(scope.row, '逾期贷记卡_余额')"
                        >
                          {{ scope.row.逾期贷记卡_余额 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="逾期贷记卡_90天" label="是否90天以上逾期" width="150">
                      <template slot-scope="scope">
                        <div
                          class="editable-cell"
                          @click="handleEdit(scope.row, '逾期贷记卡_90天')"
                        >
                          {{ scope.row.逾期贷记卡_90天 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                  </el-table-column>

                  <!-- 从未逾期过的贷记卡 -->
                  <el-table-column label="(二)从未逾期过的贷记卡" align="center">
                    <el-table-column prop="正常贷记卡_信用额度" label="信用额度(元)" width="120">
                      <template slot-scope="scope">
                        <div
                          class="editable-cell"
                          @click="handleEdit(scope.row, '正常贷记卡_信用额度')"
                        >
                          {{ scope.row.正常贷记卡_信用额度 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column
                      prop="正常贷记卡_已使用额度"
                      label="已使用额度(元)"
                      width="130"
                    >
                      <template slot-scope="scope">
                        <div
                          class="editable-cell"
                          @click="handleEdit(scope.row, '正常贷记卡_已使用额度')"
                        >
                          {{ scope.row.正常贷记卡_已使用额度 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                  </el-table-column>
                </el-table-column>

                <!-- 贷款情况 -->
                <el-table-column label="贷款情况" align="center">
                  <!-- 贷款账户 -->
                  <el-table-column label="贷款账户" align="center">
                    <el-table-column prop="贷款_发放额度" label="发放额度(元)" width="120">
                      <template slot-scope="scope">
                        <div class="editable-cell" @click="handleEdit(scope.row, '贷款_发放额度')">
                          {{ scope.row.贷款_发放额度 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="贷款_余额" label="余额(元)" width="110">
                      <template slot-scope="scope">
                        <div class="editable-cell" @click="handleEdit(scope.row, '贷款_余额')">
                          {{ scope.row.贷款_余额 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="贷款_房贷发放额度" label="房贷发放额度(元)" width="140">
                      <template slot-scope="scope">
                        <div
                          class="editable-cell"
                          @click="handleEdit(scope.row, '贷款_房贷发放额度')"
                        >
                          {{ scope.row.贷款_房贷发放额度 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="贷款_房贷余额" label="房贷余额(元)" width="120">
                      <template slot-scope="scope">
                        <div class="editable-cell" @click="handleEdit(scope.row, '贷款_房贷余额')">
                          {{ scope.row.贷款_房贷余额 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="贷款_经营贷余额" label="经营贷余额(元)" width="130">
                      <template slot-scope="scope">
                        <div
                          class="editable-cell"
                          @click="handleEdit(scope.row, '贷款_经营贷余额')"
                        >
                          {{ scope.row.贷款_经营贷余额 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                  </el-table-column>

                  <!-- 发生过逾期账户 -->
                  <el-table-column label="(一)发生过逾期账户" align="center">
                    <el-table-column prop="逾期贷款_发放额度" label="发放额度(元)" width="120">
                      <template slot-scope="scope">
                        <div
                          class="editable-cell"
                          @click="handleEdit(scope.row, '逾期贷款_发放额度')"
                        >
                          {{ scope.row.逾期贷款_发放额度 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="逾期贷款_余额" label="余额(元)" width="110">
                      <template slot-scope="scope">
                        <div class="editable-cell" @click="handleEdit(scope.row, '逾期贷款_余额')">
                          {{ scope.row.逾期贷款_余额 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="逾期贷款_90天" label="是否90天以上逾期" width="150">
                      <template slot-scope="scope">
                        <div class="editable-cell" @click="handleEdit(scope.row, '逾期贷款_90天')">
                          {{ scope.row.逾期贷款_90天 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                  </el-table-column>

                  <!-- 从未发生过逾期的账户 -->
                  <el-table-column label="(二)从未发生过逾期的账户" align="center">
                    <el-table-column prop="正常贷款_发放额度" label="发放额度(元)" width="120">
                      <template slot-scope="scope">
                        <div
                          class="editable-cell"
                          @click="handleEdit(scope.row, '正常贷款_发放额度')"
                        >
                          {{ scope.row.正常贷款_发放额度 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="正常贷款_余额" label="余额(元)" width="110">
                      <template slot-scope="scope">
                        <div class="editable-cell" @click="handleEdit(scope.row, '正常贷款_余额')">
                          {{ scope.row.正常贷款_余额 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                  </el-table-column>
                </el-table-column>

                <!-- 相关还款责任信息 -->
                <el-table-column label="相关还款责任信息" align="center">
                  <el-table-column label="为个人" align="center">
                    <el-table-column prop="还款责任_个人" label="办理贷款数" width="110">
                      <template slot-scope="scope">
                        <div class="editable-cell" @click="handleEdit(scope.row, '还款责任_个人')">
                          {{ scope.row.还款责任_个人 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                  </el-table-column>
                  <el-table-column label="为企业" align="center">
                    <el-table-column prop="还款责任_企业" label="办理贷款数" width="110">
                      <template slot-scope="scope">
                        <div class="editable-cell" @click="handleEdit(scope.row, '还款责任_企业')">
                          {{ scope.row.还款责任_企业 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                  </el-table-column>
                  <el-table-column label="其他业务账户(担保)" align="center">
                    <el-table-column prop="还款责任_担保余额" label="余额(元)" width="110">
                      <template slot-scope="scope">
                        <div
                          class="editable-cell"
                          @click="handleEdit(scope.row, '还款责任_担保余额')"
                        >
                          {{ scope.row.还款责任_担保余额 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                  </el-table-column>
                </el-table-column>

                <!-- 记录信息 -->
                <el-table-column label="记录信息" align="center">
                  <el-table-column prop="非信贷交易记录" label="非信贷交易记录" width="130">
                    <template slot-scope="scope">
                      <div class="editable-cell" @click="handleEdit(scope.row, '非信贷交易记录')">
                        {{ scope.row.非信贷交易记录 }}
                        <i class="el-icon-edit edit-icon"></i>
                      </div>
                    </template>
                  </el-table-column>
                  <el-table-column prop="公共记录" label="公共记录" width="100">
                    <template slot-scope="scope">
                      <div class="editable-cell" @click="handleEdit(scope.row, '公共记录')">
                        {{ scope.row.公共记录 }}
                        <i class="el-icon-edit edit-icon"></i>
                      </div>
                    </template>
                  </el-table-column>
                </el-table-column>

                <!-- 查询记录 -->
                <el-table-column label="查询记录" align="center">
                  <el-table-column prop="查询_机构个数" label="不同查询机构个数" width="140">
                    <template slot-scope="scope">
                      <div class="editable-cell" @click="handleEdit(scope.row, '查询_机构个数')">
                        {{ scope.row.查询_机构个数 }}
                        <i class="el-icon-edit edit-icon"></i>
                      </div>
                    </template>
                  </el-table-column>
                  <el-table-column label="机构查询原因" align="center">
                    <el-table-column prop="查询_贷款审批" label="贷款审批" width="100">
                      <template slot-scope="scope">
                        <div class="editable-cell" @click="handleEdit(scope.row, '查询_贷款审批')">
                          {{ scope.row.查询_贷款审批 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="查询_信用卡审批" label="信用卡审批" width="110">
                      <template slot-scope="scope">
                        <div
                          class="editable-cell"
                          @click="handleEdit(scope.row, '查询_信用卡审批')"
                        >
                          {{ scope.row.查询_信用卡审批 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="查询_贷后管理" label="贷后管理" width="100">
                      <template slot-scope="scope">
                        <div class="editable-cell" @click="handleEdit(scope.row, '查询_贷后管理')">
                          {{ scope.row.查询_贷后管理 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="查询_保前审查" label="保前审查" width="100">
                      <template slot-scope="scope">
                        <div class="editable-cell" @click="handleEdit(scope.row, '查询_保前审查')">
                          {{ scope.row.查询_保前审查 }}
                          <i class="el-icon-edit edit-icon"></i>
                        </div>
                      </template>
                    </el-table-column>
                  </el-table-column>
                  <el-table-column prop="查询_个人查询" label="个人查询笔数" width="120">
                    <template slot-scope="scope">
                      <div class="editable-cell" @click="handleEdit(scope.row, '查询_个人查询')">
                        {{ scope.row.查询_个人查询 }}
                        <i class="el-icon-edit edit-icon"></i>
                      </div>
                    </template>
                  </el-table-column>
                </el-table-column>

                <!-- 账户对比情况 -->
                <el-table-column label="账户对比情况" align="center">
                  <el-table-column prop="对比_信用卡增加" label="信用卡账户增加数" width="140">
                    <template slot-scope="scope">
                      <div class="editable-cell" @click="handleEdit(scope.row, '对比_信用卡增加')">
                        {{ scope.row.对比_信用卡增加 }}
                        <i class="el-icon-edit edit-icon"></i>
                      </div>
                    </template>
                  </el-table-column>
                  <el-table-column prop="对比_其他贷款增加" label="其他贷款账户增加数" width="150">
                    <template slot-scope="scope">
                      <div
                        class="editable-cell"
                        @click="handleEdit(scope.row, '对比_其他贷款增加')"
                      >
                        {{ scope.row.对比_其他贷款增加 }}
                        <i class="el-icon-edit edit-icon"></i>
                      </div>
                    </template>
                  </el-table-column>
                  <el-table-column prop="对比_还款责任增加" label="相关还款责任增加数" width="160">
                    <template slot-scope="scope">
                      <div
                        class="editable-cell"
                        @click="handleEdit(scope.row, '对比_还款责任增加')"
                      >
                        {{ scope.row.对比_还款责任增加 }}
                        <i class="el-icon-edit edit-icon"></i>
                      </div>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="对比_其他贷款余额增加"
                    label="其他贷款余额增加(元)"
                    width="170"
                  >
                    <template slot-scope="scope">
                      <div
                        class="editable-cell"
                        @click="handleEdit(scope.row, '对比_其他贷款余额增加')"
                      >
                        {{ scope.row.对比_其他贷款余额增加 }}
                        <i class="el-icon-edit edit-icon"></i>
                      </div>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="对比_信用卡余额增加"
                    label="信用卡余额增加(元)"
                    width="150"
                  >
                    <template slot-scope="scope">
                      <div
                        class="editable-cell"
                        @click="handleEdit(scope.row, '对比_信用卡余额增加')"
                      >
                        {{ scope.row.对比_信用卡余额增加 }}
                        <i class="el-icon-edit edit-icon"></i>
                      </div>
                    </template>
                  </el-table-column>
                </el-table-column>

                <!-- 操作列 -->
                <el-table-column
                  label="操作"
                  width="140"
                  fixed="right"
                  class-name="operation-column"
                >
                  <template slot-scope="scope">
                    <div class="operation-buttons">
                      <el-button type="text" size="small" @click="handleViewDetail(scope.row)">
                        详情
                      </el-button>
                      <el-divider direction="vertical"></el-divider>
                      <el-button type="text" size="small" @click="handleViewHistory(scope.row)">
                        修改记录
                      </el-button>
                    </div>
                  </template>
                </el-table-column>
              </el-table>

              <!-- 分页 -->
              <div class="pagination-container">
                <el-pagination
                  @size-change="handleSizeChange"
                  @current-change="handleCurrentChange"
                  :current-page="currentPage"
                  :page-sizes="[10, 20, 50, 100]"
                  :page-size="pageSize"
                  layout="total, sizes, prev, pager, next, jumper"
                  :total="total"
                ></el-pagination>
              </div>
            </el-card>
          </div>

          <!-- 排查汇总统计页面 -->
          <div v-show="activeMenu === 'org-statistics'">
            <!-- 页面标题 -->
            <div class="page-header">
              <h2>排查汇总统计</h2>
              <div class="breadcrumb">
                <span>管理</span>
                <span>/</span>
                <span>排查汇总统计</span>
              </div>
            </div>

            <!-- 筛选区域 -->
            <el-card shadow="never" style="margin-bottom: 24px">
              <div slot="header" class="clearfix">
                <span style="font-weight: 600; font-size: 16px; color: #303133">数据筛选</span>
              </div>
              <el-form :model="orgStatisticsFilterForm" label-width="100px">
                <el-row :gutter="20">
                  <el-col :span="6">
                    <el-form-item label="年度">
                      <el-select
                        v-model="orgStatisticsFilterForm.year"
                        placeholder="请选择年度"
                        style="width: 100%"
                      >
                        <el-option label="2025年" value="2025"></el-option>
                        <el-option label="2024年" value="2024"></el-option>
                        <el-option label="2023年" value="2023"></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="发起机构">
                      <el-select
                        v-model="orgStatisticsFilterForm.initiatingOrg"
                        multiple
                        placeholder="请选择发起机构"
                        style="width: 100%"
                      >
                        <el-option label="江苏省分行" value="江苏省分行"></el-option>
                        <el-option label="南京市分行" value="南京市分行"></el-option>
                        <el-option label="苏州市分行" value="苏州市分行"></el-option>
                        <el-option label="无锡市分行" value="无锡市分行"></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="批次">
                      <el-select
                        v-model="orgStatisticsFilterForm.batch"
                        multiple
                        placeholder="请选择批次"
                        style="width: 100%"
                      >
                        <el-option
                          label="南京市分行2025年第一批次"
                          value="2025年第一季度"
                        ></el-option>
                        <el-option
                          label="江苏省分行2024年第四批次"
                          value="2024年第四季度"
                        ></el-option>
                        <el-option
                          label="江苏省分行2024年第三批次"
                          value="2024年第三季度"
                        ></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="统计粒度">
                      <el-select
                        v-model="orgStatisticsFilterForm.granularity"
                        placeholder="请选择统计粒度"
                        style="width: 100%"
                      >
                        <el-option label="机构" value="institution"></el-option>
                        <el-option label="部门" value="department"></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="所属机构">
                      <el-popover
                        placement="bottom-start"
                        width="400"
                        trigger="click"
                        v-model="orgStatisticsOrgPopoverVisible"
                        @show="handleOrgStatisticsOrgPopoverOpen"
                      >
                        <el-tree
                          ref="orgStatisticsOrgTree"
                          :data="orgTreeData"
                          :props="orgTreeProps"
                          node-key="value"
                          show-checkbox
                          check-strictly
                          :default-expand-all="false"
                          :expand-on-click-node="true"
                          :check-on-click-node="true"
                          :default-checked-keys="orgStatisticsFilterForm.organizationCheckedKeys"
                          @check="handleOrgStatisticsOrgTreeCheck"
                          style="max-height: 400px; overflow-y: auto"
                        ></el-tree>
                        <div style="text-align: right; margin-top: 10px">
                          <el-button size="mini" @click="handleOrgStatisticsOrgCancel">
                            取消
                          </el-button>
                          <el-button
                            type="primary"
                            size="mini"
                            @click="handleOrgStatisticsOrgConfirm"
                          >
                            确定
                          </el-button>
                        </div>
                        <el-input
                          slot="reference"
                          v-model="orgStatisticsFilterForm.selectedOrgPaths"
                          placeholder="请选择所属机构（可多选）"
                          readonly
                          style="cursor: pointer"
                        >
                          <i slot="suffix" class="el-input__icon el-icon-arrow-down"></i>
                        </el-input>
                      </el-popover>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="所属部门">
                      <el-select
                        v-model="orgStatisticsFilterForm.department"
                        multiple
                        placeholder="请选择所属部门"
                        style="width: 100%"
                      >
                        <el-option label="营业部" value="营业部"></el-option>
                        <el-option label="信贷部" value="信贷部"></el-option>
                        <el-option label="风控部" value="风控部"></el-option>
                        <el-option label="人事部" value="人事部"></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row :gutter="20">
                  <el-col :span="6">
                    <el-form-item label="预警指标">
                      <el-select
                        v-model="orgStatisticsFilterForm.warningIndicator"
                        multiple
                        placeholder="请选择预警指标"
                        style="width: 100%"
                      >
                        <el-option label="关注人数" value="关注人数"></el-option>
                        <el-option label="预警总数" value="预警总数"></el-option>
                        <el-option label="必要关注" value="必要关注"></el-option>
                        <el-option label="一级预警" value="一级预警"></el-option>
                        <el-option label="二级预警" value="二级预警"></el-option>
                        <el-option label="三级预警" value="三级预警"></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="18">
                    <el-form-item>
                      <el-button type="primary" @click="handleOrgStatisticsQuery">查询</el-button>
                      <el-button @click="handleOrgStatisticsReset">重置</el-button>
                      <el-button type="success" @click="handleOrgStatisticsExport">
                        导出Excel
                      </el-button>
                      <el-button @click="handleOrgStatisticsRefresh">刷新</el-button>
                    </el-form-item>
                  </el-col>
                </el-row>
              </el-form>
            </el-card>

            <!-- 统计表格 -->
            <el-card shadow="never">
              <div slot="header" class="clearfix">
                <span style="font-weight: 600; font-size: 16px; color: #303133">排查汇总统计</span>
                <div style="float: right">
                  <el-button type="primary" size="small" @click="handleOrgStatisticsExport">
                    <i class="el-icon-download"></i>
                    导出Excel
                  </el-button>
                </div>
              </div>

              <!-- 使用Element UI表格组件 -->
              <el-table
                :data="orgStatisticsData"
                border
                style="width: 100%"
                :row-style="{ height: '48px' }"
              >
                <!-- 固定列 -->
                <el-table-column
                  prop="index"
                  label="序号"
                  width="80"
                  fixed
                  align="center"
                ></el-table-column>
                <el-table-column
                  prop="initiatingOrg"
                  label="发起机构"
                  width="140"
                  fixed
                  align="center"
                ></el-table-column>
                <el-table-column
                  prop="batch"
                  label="批次"
                  width="200"
                  fixed
                  align="center"
                ></el-table-column>
                <el-table-column
                  prop="organization"
                  label="所属机构"
                  width="140"
                  fixed
                  align="center"
                ></el-table-column>

                <!-- 非固定列 -->
                <el-table-column prop="department" label="所属部门" width="120" align="center">
                  <template slot-scope="scope">{{ scope.row.department || '-' }}</template>
                </el-table-column>
                <el-table-column
                  prop="checkCount"
                  label="排查人数"
                  width="120"
                  align="center"
                ></el-table-column>
                <el-table-column
                  prop="attentionCount"
                  label="关注人数"
                  width="120"
                  align="center"
                ></el-table-column>
                <el-table-column
                  prop="warningTotalCount"
                  label="预警总人数"
                  width="130"
                  align="center"
                ></el-table-column>
                <el-table-column
                  prop="level1Warning"
                  label="一级预警"
                  width="120"
                  align="center"
                ></el-table-column>
                <el-table-column
                  prop="level2Warning"
                  label="二级预警"
                  width="120"
                  align="center"
                ></el-table-column>
                <el-table-column
                  prop="level3Warning"
                  label="三级预警"
                  width="120"
                  align="center"
                ></el-table-column>
                <el-table-column
                  prop="attentionRate"
                  label="关注人数占比"
                  width="140"
                  align="center"
                >
                  <template slot-scope="scope">{{ scope.row.attentionRate }}%</template>
                </el-table-column>
                <el-table-column
                  prop="warningTotalRate"
                  label="预警总人数占比"
                  width="150"
                  align="center"
                >
                  <template slot-scope="scope">{{ scope.row.warningTotalRate }}%</template>
                </el-table-column>
                <el-table-column
                  prop="level1WarningRate"
                  label="一级预警人数占比"
                  width="160"
                  align="center"
                >
                  <template slot-scope="scope">{{ scope.row.level1WarningRate }}%</template>
                </el-table-column>
                <el-table-column
                  prop="level2WarningRate"
                  label="二级预警人数占比"
                  width="160"
                  align="center"
                >
                  <template slot-scope="scope">{{ scope.row.level2WarningRate }}%</template>
                </el-table-column>
                <el-table-column
                  prop="level3WarningRate"
                  label="三级预警人数占比"
                  width="160"
                  align="center"
                >
                  <template slot-scope="scope">{{ scope.row.level3WarningRate }}%</template>
                </el-table-column>
                <el-table-column
                  prop="averageScore"
                  label="平均分"
                  width="120"
                  align="center"
                ></el-table-column>
              </el-table>
            </el-card>
          </div>
        </div>
      </div>

      <!-- 数据修改弹窗 -->
      <el-dialog
        title="修改数据"
        :visible.sync="editDialogVisible"
        width="600px"
        @close="handleEditDialogClose"
      >
        <el-form :model="editForm" :rules="editRules" ref="editForm" label-width="120px">
          <el-form-item label="字段名称">
            <el-input v-model="editForm.fieldName" disabled></el-input>
          </el-form-item>
          <el-form-item label="原始值">
            <el-input v-model="editForm.oldValue" disabled></el-input>
          </el-form-item>
          <el-form-item label="新值" prop="newValue">
            <!-- 预警等级字段使用下拉选择 -->
            <el-select
              v-if="editForm.fieldName === '预警等级'"
              v-model="editForm.newValue"
              placeholder="请选择预警等级"
              style="width: 100%"
            >
              <el-option label="正常" value="0"></el-option>
              <el-option label="必要关注" value="1"></el-option>
              <el-option label="一级预警" value="2"></el-option>
              <el-option label="二级预警" value="3"></el-option>
              <el-option label="三级预警" value="4"></el-option>
            </el-select>
            <!-- 核实状态字段使用下拉选择 -->
            <el-select
              v-else-if="editForm.fieldName === '核实状态'"
              v-model="editForm.newValue"
              placeholder="请选择核实状态"
              style="width: 100%"
            >
              <el-option label="已核实" value="已核实"></el-option>
              <el-option label="未核实" value="未核实"></el-option>
            </el-select>
            <!-- 其他字段使用输入框 -->
            <el-input v-else v-model="editForm.newValue" placeholder="请输入新值"></el-input>
          </el-form-item>
          <el-form-item label="修改原因" prop="reason">
            <el-input
              type="textarea"
              v-model="editForm.reason"
              placeholder="请输入修改原因，不少于10字"
              :rows="4"
              maxlength="500"
              show-word-limit
            ></el-input>
          </el-form-item>
          <el-form-item label="补充材料">
            <el-upload
              class="upload-demo"
              :action="uploadAction"
              :on-preview="handlePreview"
              :on-remove="handleRemove"
              :file-list="editForm.fileList"
              :limit="5"
              accept=".jpg,.jpeg,.png,.pdf,.doc,.docx,.xls,.xlsx"
            >
              <el-button size="small" type="primary">点击上传</el-button>
              <div slot="tip" class="el-upload__tip">
                支持上传图片、PDF、Word、Excel文件，单个文件不超过10MB
              </div>
            </el-upload>
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="editDialogVisible = false">取消</el-button>
          <el-button type="primary" @click="handleEditSubmit">确定</el-button>
        </div>
      </el-dialog>

      <!-- 修改记录弹窗 -->
      <el-dialog title="修改记录" :visible.sync="historyDialogVisible" width="800px">
        <div v-if="historyList.length > 0">
          <div class="history-item" v-for="(item, index) in historyList" :key="index">
            <div class="history-header">
              <span>
                <strong>修改人：</strong>
                {{ item.修改人 }} ({{ item.工号 }})
              </span>
              <span>
                <strong>修改时间：</strong>
                {{ item.修改时间 }}
              </span>
            </div>
            <div class="history-content">
              <div>
                <strong>字段名称：</strong>
                {{ item.字段名称 }}
              </div>
              <div>
                <strong>原始值：</strong>
                {{ item.原始值 }}
              </div>
              <div>
                <strong>新值：</strong>
                {{ item.新值 }}
              </div>
              <div>
                <strong>修改原因：</strong>
                {{ item.修改原因 }}
              </div>
              <div v-if="item.补充材料">
                <strong>补充材料：</strong>
                <el-link type="primary" :href="item.补充材料" target="_blank">查看材料</el-link>
              </div>
            </div>
          </div>
        </div>
        <el-empty v-else description="暂无修改记录"></el-empty>
        <div slot="footer" class="dialog-footer">
          <el-button type="primary" @click="historyDialogVisible = false">关闭</el-button>
        </div>
      </el-dialog>

      <!-- 详情查看弹窗 -->
      <el-dialog title="员工台账详情" :visible.sync="detailDialogVisible" width="80%" top="5vh">
        <div v-if="currentDetailRow">
          <el-descriptions :column="3" border>
            <el-descriptions-item label="姓名">{{ currentDetailRow.姓名 }}</el-descriptions-item>
            <el-descriptions-item label="工号">{{ currentDetailRow.工号 }}</el-descriptions-item>
            <el-descriptions-item label="批次">{{ currentDetailRow.批次 }}</el-descriptions-item>
            <el-descriptions-item label="查询日期">
              {{ currentDetailRow.查询日期 }}
            </el-descriptions-item>
            <el-descriptions-item label="所属机构">
              {{ currentDetailRow.所属机构 }}
            </el-descriptions-item>
            <el-descriptions-item label="所属部门">
              {{ currentDetailRow.所属部门 }}
            </el-descriptions-item>
            <el-descriptions-item label="征信分数">
              {{ currentDetailRow.征信分数 }}
            </el-descriptions-item>
            <el-descriptions-item label="预警等级">
              <span class="warning-badge" :class="getWarningClass(currentDetailRow.预警等级)">
                {{ getWarningText(currentDetailRow.预警等级) }}
              </span>
            </el-descriptions-item>
            <el-descriptions-item label="上一期征信分数">
              {{ currentDetailRow.上一期征信分数 }}
            </el-descriptions-item>
          </el-descriptions>

          <el-divider content-position="left">账户数情况</el-divider>
          <el-descriptions :column="4" border size="small">
            <el-descriptions-item label="总账户数-购房贷款">
              {{ currentDetailRow.总账户数_购房贷款 }}
            </el-descriptions-item>
            <el-descriptions-item label="总账户数-其他贷款">
              {{ currentDetailRow.总账户数_其他贷款 }}
            </el-descriptions-item>
            <el-descriptions-item label="总账户数-其他业务">
              {{ currentDetailRow.总账户数_其他业务 }}
            </el-descriptions-item>
            <el-descriptions-item label="未结清信用卡">
              {{ currentDetailRow.未结清_信用卡 }}
            </el-descriptions-item>
            <el-descriptions-item label="未结清购房贷款">
              {{ currentDetailRow.未结清_购房贷款 }}
            </el-descriptions-item>
            <el-descriptions-item label="未结清其他贷款">
              {{ currentDetailRow.未结清_其他贷款 }}
            </el-descriptions-item>
            <el-descriptions-item label="未结清其他业务">
              {{ currentDetailRow.未结清_其他业务 }}
            </el-descriptions-item>
            <el-descriptions-item label="逾期信用卡">
              {{ currentDetailRow.逾期_信用卡 }}
            </el-descriptions-item>
            <el-descriptions-item label="逾期购房贷款">
              {{ currentDetailRow.逾期_购房贷款 }}
            </el-descriptions-item>
            <el-descriptions-item label="逾期其他贷款">
              {{ currentDetailRow.逾期_其他贷款 }}
            </el-descriptions-item>
            <el-descriptions-item label="逾期其他业务">
              {{ currentDetailRow.逾期_其他业务 }}
            </el-descriptions-item>
            <el-descriptions-item label="逾期90天信用卡">
              {{ currentDetailRow.逾期90天_信用卡 }}
            </el-descriptions-item>
            <el-descriptions-item label="逾期90天购房贷款">
              {{ currentDetailRow.逾期90天_购房贷款 }}
            </el-descriptions-item>
            <el-descriptions-item label="逾期90天其他贷款">
              {{ currentDetailRow.逾期90天_其他贷款 }}
            </el-descriptions-item>
            <el-descriptions-item label="逾期90天其他业务">
              {{ currentDetailRow.逾期90天_其他业务 }}
            </el-descriptions-item>
          </el-descriptions>

          <el-divider content-position="left">信用卡情况</el-divider>
          <el-descriptions :column="3" border size="small">
            <el-descriptions-item label="信用额度">
              {{ currentDetailRow.信用卡_信用额度 }}元
            </el-descriptions-item>
            <el-descriptions-item label="已使用额度">
              {{ currentDetailRow.信用卡_已使用额度 }}元
            </el-descriptions-item>
            <el-descriptions-item label="分期余额">
              {{ currentDetailRow.信用卡_分期余额 }}元
            </el-descriptions-item>
          </el-descriptions>

          <el-divider content-position="left">贷款情况</el-divider>
          <el-descriptions :column="3" border size="small">
            <el-descriptions-item label="发放额度">
              {{ currentDetailRow.贷款_发放额度 }}元
            </el-descriptions-item>
            <el-descriptions-item label="余额">
              {{ currentDetailRow.贷款_余额 }}元
            </el-descriptions-item>
            <el-descriptions-item label="房贷余额">
              {{ currentDetailRow.贷款_房贷余额 }}元
            </el-descriptions-item>
            <el-descriptions-item label="经营贷余额">
              {{ currentDetailRow.贷款_经营贷余额 }}元
            </el-descriptions-item>
          </el-descriptions>

          <el-divider content-position="left">查询记录</el-divider>
          <el-descriptions :column="3" border size="small">
            <el-descriptions-item label="不同查询机构个数">
              {{ currentDetailRow.查询_机构个数 }}
            </el-descriptions-item>
            <el-descriptions-item label="贷款审批">
              {{ currentDetailRow.查询_贷款审批 }}
            </el-descriptions-item>
            <el-descriptions-item label="信用卡审批">
              {{ currentDetailRow.查询_信用卡审批 }}
            </el-descriptions-item>
            <el-descriptions-item label="贷后管理">
              {{ currentDetailRow.查询_贷后管理 }}
            </el-descriptions-item>
            <el-descriptions-item label="保前审查">
              {{ currentDetailRow.查询_保前审查 }}
            </el-descriptions-item>
            <el-descriptions-item label="个人查询">
              {{ currentDetailRow.查询_个人查询 }}
            </el-descriptions-item>
          </el-descriptions>
        </div>
        <div slot="footer" class="dialog-footer">
          <el-button type="primary" @click="detailDialogVisible = false">关闭</el-button>
        </div>
      </el-dialog>

      <!-- 添加授权用户弹窗 -->
      <el-dialog title="添加授权用户" :visible.sync="addUserDialogVisible" width="600px">
        <el-form :model="addUserForm" label-width="120px" size="small">
          <el-form-item label="选择用户">
            <el-input
              v-model="addUserForm.keyword"
              placeholder="请输入姓名或工号搜索 OA 用户"
              clearable
            >
              <el-button slot="append" icon="el-icon-search">搜索</el-button>
            </el-input>
            <div style="color: #909399; font-size: 12px; margin-top: 4px">
              提示：从 OA 系统用户库中搜索并选择用户
            </div>
          </el-form-item>
          <el-form-item label="姓名">
            <el-input value="张三" disabled></el-input>
          </el-form-item>
          <el-form-item label="工号">
            <el-input value="10005001" disabled></el-input>
          </el-form-item>
          <el-form-item label="所属机构">
            <el-input value="南京市分行" disabled></el-input>
          </el-form-item>
          <el-form-item label="所属部门">
            <el-input value="风险管理部" disabled></el-input>
          </el-form-item>
          <el-form-item label="授权角色" required>
            <el-select v-model="addUserForm.role" placeholder="请选择角色">
              <el-option label="综合员" value="reviewer"></el-option>
              <el-option label="部门负责人" value="dept_leader"></el-option>
              <el-option label="人力管理员" value="hr_admin"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="授权说明">
            <el-input
              type="textarea"
              v-model="addUserForm.description"
              placeholder="请输入授权原因说明（可选）"
              :rows="3"
            ></el-input>
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="addUserDialogVisible = false">取 消</el-button>
          <el-button type="primary" @click="handleConfirmAddUser">确 定</el-button>
        </div>
      </el-dialog>

      <!-- 修改角色弹窗 -->
      <el-dialog title="修改用户角色" :visible.sync="editRoleDialogVisible" width="500px">
        <el-form :model="editRoleForm" label-width="100px" size="small">
          <el-form-item label="姓名">
            <el-input :value="editRoleForm.name" disabled></el-input>
          </el-form-item>
          <el-form-item label="工号">
            <el-input :value="editRoleForm.jobNumber" disabled></el-input>
          </el-form-item>
          <el-form-item label="原角色">
            <el-input :value="editRoleForm.oldRole" disabled></el-input>
          </el-form-item>
          <el-form-item label="新角色" required>
            <el-select v-model="editRoleForm.newRole" multiple placeholder="请选择新角色">
              <el-option label="综合员" value="reviewer"></el-option>
              <el-option label="部门负责人" value="dept_leader"></el-option>
              <el-option label="人力管理员" value="hr_admin"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="变更原因" required>
            <el-input
              type="textarea"
              v-model="editRoleForm.reason"
              placeholder="请输入角色变更的原因"
              :rows="3"
            ></el-input>
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="editRoleDialogVisible = false">取 消</el-button>
          <el-button type="primary" @click="handleConfirmEditRole">确 定</el-button>
        </div>
      </el-dialog>

      <!-- 测算工具弹窗 -->
      <el-dialog title="评分测算工具" :visible.sync="calculatorDialogVisible" width="800px">
        <el-alert title="使用说明" type="info" :closable="false" style="margin-bottom: 20px">
          <div slot="description">
            输入各排查项的测试数值，系统将根据当前参数配置自动计算得分和预警等级
          </div>
        </el-alert>

        <el-form label-width="200px" size="small">
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="信用卡账户数">
                <el-input-number
                  v-model="calculatorForm.testData.creditCards"
                  :min="0"
                  controls-position="right"
                ></el-input-number>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="其他贷款账户数">
                <el-input-number
                  v-model="calculatorForm.testData.otherLoans"
                  :min="0"
                  controls-position="right"
                ></el-input-number>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="逾期账户数">
                <el-input-number
                  v-model="calculatorForm.testData.overdueAccounts"
                  :min="0"
                  controls-position="right"
                ></el-input-number>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="90天以上逾期账户数">
                <el-input-number
                  v-model="calculatorForm.testData.overdue90"
                  :min="0"
                  controls-position="right"
                ></el-input-number>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="信用卡已使用额度">
                <el-input-number
                  v-model="calculatorForm.testData.creditUsed"
                  :min="0"
                  controls-position="right"
                ></el-input-number>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="机构查询次数">
                <el-input-number
                  v-model="calculatorForm.testData.queries"
                  :min="0"
                  controls-position="right"
                ></el-input-number>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>

        <div style="margin-top: 24px; padding: 20px; background: #f5f7fa; border-radius: 4px">
          <el-button type="primary" @click="handleCalculate" style="margin-bottom: 16px">
            <i class="el-icon-data-analysis"></i>
            开始计算
          </el-button>

          <div v-if="calculatorForm.result" style="margin-top: 16px">
            <el-divider content-position="left">计算结果</el-divider>
            <el-descriptions :column="2" border>
              <el-descriptions-item label="最终得分">
                <span style="font-size: 24px; font-weight: 600; color: #409eff">
                  {{ calculatorForm.result.score }}
                </span>
                分
              </el-descriptions-item>
              <el-descriptions-item label="预警等级">
                <el-tag :type="calculatorForm.result.levelType" size="medium">
                  {{ calculatorForm.result.level }}
                </el-tag>
              </el-descriptions-item>
            </el-descriptions>

            <el-divider content-position="left">扣分明细</el-divider>
            <el-table :data="calculatorForm.result.details" border size="small">
              <el-table-column prop="item" label="排查项" min-width="200"></el-table-column>
              <el-table-column
                prop="value"
                label="数值"
                width="100"
                align="center"
              ></el-table-column>
              <el-table-column
                prop="score"
                label="单项分值"
                width="100"
                align="center"
              ></el-table-column>
              <el-table-column
                prop="deduct"
                label="扣除分数"
                width="100"
                align="center"
              ></el-table-column>
            </el-table>
          </div>
        </div>

        <div slot="footer" class="dialog-footer">
          <el-button @click="calculatorDialogVisible = false">关 闭</el-button>
        </div>
      </el-dialog>

      <!-- 资料查看弹窗 -->
      <el-dialog title="员工资料查看" :visible.sync="materialsDialogVisible" width="80%" top="5vh">
        <div v-if="currentMaterialsRow">
          <el-descriptions :column="2" border>
            <el-descriptions-item label="姓名">{{ currentMaterialsRow.name }}</el-descriptions-item>
            <el-descriptions-item label="工号">
              {{ currentMaterialsRow.employeeId }}
            </el-descriptions-item>
            <el-descriptions-item label="部门">
              {{ currentMaterialsRow.department }}
            </el-descriptions-item>
            <el-descriptions-item label="批次">
              {{ currentMaterialsRow.batch }}
            </el-descriptions-item>
          </el-descriptions>

          <div style="margin-top: 20px">
            <h4>上传资料</h4>
            <el-row :gutter="20">
              <el-col :span="12">
                <el-card shadow="hover" style="margin-bottom: 15px">
                  <div slot="header">
                    <span>征信报告</span>
                    <el-tag
                      v-if="currentMaterialsRow.creditReport"
                      type="success"
                      size="small"
                      style="margin-left: 10px"
                    >
                      已上传
                    </el-tag>
                    <el-tag v-else type="info" size="small" style="margin-left: 10px">
                      未上传
                    </el-tag>
                  </div>
                  <div v-if="currentMaterialsRow.creditReport">
                    <p>
                      <strong>文件大小：</strong>
                      {{ currentMaterialsRow.creditReport.size }}
                    </p>
                    <p>
                      <strong>文件格式：</strong>
                      {{ currentMaterialsRow.creditReport.format }}
                    </p>
                    <p>
                      <strong>上传时间：</strong>
                      {{ currentMaterialsRow.creditReport.uploadTime }}
                    </p>
                    <el-button type="primary" size="mini" @click="previewFile('creditReport')">
                      <i class="el-icon-view"></i>
                      预览
                    </el-button>
                    <el-button type="success" size="mini" @click="downloadFile('creditReport')">
                      <i class="el-icon-download"></i>
                      下载
                    </el-button>
                  </div>
                  <div v-else class="no-data">暂无资料</div>
                </el-card>
              </el-col>
              <el-col :span="12">
                <el-card shadow="hover" style="margin-bottom: 15px">
                  <div slot="header">
                    <span>无犯罪记录证明</span>
                    <el-tag
                      v-if="currentMaterialsRow.criminalRecord"
                      type="success"
                      size="small"
                      style="margin-left: 10px"
                    >
                      已上传
                    </el-tag>
                    <el-tag v-else type="info" size="small" style="margin-left: 10px">
                      未上传
                    </el-tag>
                  </div>
                  <div v-if="currentMaterialsRow.criminalRecord">
                    <p>
                      <strong>文件大小：</strong>
                      {{ currentMaterialsRow.criminalRecord.size }}
                    </p>
                    <p>
                      <strong>文件格式：</strong>
                      {{ currentMaterialsRow.criminalRecord.format }}
                    </p>
                    <p>
                      <strong>上传时间：</strong>
                      {{ currentMaterialsRow.criminalRecord.uploadTime }}
                    </p>
                    <el-button type="primary" size="mini" @click="previewFile('criminalRecord')">
                      <i class="el-icon-view"></i>
                      预览
                    </el-button>
                    <el-button type="success" size="mini" @click="downloadFile('criminalRecord')">
                      <i class="el-icon-download"></i>
                      下载
                    </el-button>
                  </div>
                  <div v-else class="no-data">暂无资料</div>
                </el-card>
              </el-col>
              <el-col :span="12">
                <el-card shadow="hover" style="margin-bottom: 15px">
                  <div slot="header">
                    <span>经营情况截图</span>
                    <el-tag
                      v-if="currentMaterialsRow.businessScreenshot"
                      type="success"
                      size="small"
                      style="margin-left: 10px"
                    >
                      已上传
                    </el-tag>
                    <el-tag v-else type="info" size="small" style="margin-left: 10px">
                      未上传
                    </el-tag>
                  </div>
                  <div v-if="currentMaterialsRow.businessScreenshot">
                    <p>
                      <strong>文件大小：</strong>
                      {{ currentMaterialsRow.businessScreenshot.size }}
                    </p>
                    <p>
                      <strong>文件格式：</strong>
                      {{ currentMaterialsRow.businessScreenshot.format }}
                    </p>
                    <p>
                      <strong>上传时间：</strong>
                      {{ currentMaterialsRow.businessScreenshot.uploadTime }}
                    </p>
                    <el-button
                      type="primary"
                      size="mini"
                      @click="previewFile('businessScreenshot')"
                    >
                      <i class="el-icon-view"></i>
                      预览
                    </el-button>
                    <el-button
                      type="success"
                      size="mini"
                      @click="downloadFile('businessScreenshot')"
                    >
                      <i class="el-icon-download"></i>
                      下载
                    </el-button>
                  </div>
                  <div v-else class="no-data">暂无资料</div>
                </el-card>
              </el-col>
              <el-col :span="12">
                <el-card shadow="hover" style="margin-bottom: 15px">
                  <div slot="header">
                    <span>补充说明材料</span>
                    <el-tag
                      v-if="currentMaterialsRow.supplementaryMaterials"
                      type="success"
                      size="small"
                      style="margin-left: 10px"
                    >
                      已上传
                    </el-tag>
                    <el-tag v-else type="info" size="small" style="margin-left: 10px">
                      未上传
                    </el-tag>
                  </div>
                  <div v-if="currentMaterialsRow.supplementaryMaterials">
                    <p>
                      <strong>文件大小：</strong>
                      {{ currentMaterialsRow.supplementaryMaterials.size }}
                    </p>
                    <p>
                      <strong>文件格式：</strong>
                      {{ currentMaterialsRow.supplementaryMaterials.format }}
                    </p>
                    <p>
                      <strong>上传时间：</strong>
                      {{ currentMaterialsRow.supplementaryMaterials.uploadTime }}
                    </p>
                    <el-button
                      type="primary"
                      size="mini"
                      @click="previewFile('supplementaryMaterials')"
                    >
                      <i class="el-icon-view"></i>
                      预览
                    </el-button>
                    <el-button
                      type="success"
                      size="mini"
                      @click="downloadFile('supplementaryMaterials')"
                    >
                      <i class="el-icon-download"></i>
                      下载
                    </el-button>
                  </div>
                  <div v-else class="no-data">暂无资料</div>
                </el-card>
              </el-col>
            </el-row>
          </div>
        </div>
        <div slot="footer" class="dialog-footer">
          <el-button @click="materialsDialogVisible = false">关闭</el-button>
        </div>
      </el-dialog>

      <!-- 催办管理弹窗 -->
      <el-dialog title="催办管理" :visible.sync="urgeDialogVisible" width="600px">
        <el-form :model="urgeForm" label-width="100px" size="small">
          <el-form-item label="催办对象">
            <el-input :value="urgeForm.target" disabled></el-input>
          </el-form-item>
          <el-form-item label="催办模板">
            <el-select v-model="urgeForm.template" placeholder="请选择催办模板" style="width: 100%">
              <el-option label="标准催办模板" value="standard"></el-option>
              <el-option label="紧急催办模板" value="urgent"></el-option>
              <el-option label="友好提醒模板" value="friendly"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="催办内容">
            <el-input
              v-model="urgeForm.content"
              type="textarea"
              :rows="4"
              placeholder="请输入催办内容"
            ></el-input>
          </el-form-item>
          <el-form-item label="催办方式">
            <el-checkbox-group v-model="urgeForm.methods">
              <el-checkbox label="system">系统通知</el-checkbox>
              <el-checkbox label="sms">短信</el-checkbox>
              <el-checkbox label="email">邮件</el-checkbox>
              <el-checkbox label="phone">电话</el-checkbox>
            </el-checkbox-group>
          </el-form-item>
          <el-form-item label="催办时间">
            <el-radio-group v-model="urgeForm.timeType">
              <el-radio label="immediate">立即发送</el-radio>
              <el-radio label="scheduled">定时发送</el-radio>
            </el-radio-group>
            <el-date-picker
              v-if="urgeForm.timeType === 'scheduled'"
              v-model="urgeForm.scheduledTime"
              type="datetime"
              placeholder="选择发送时间"
              style="width: 100%; margin-top: 10px"
            ></el-date-picker>
          </el-form-item>
          <el-form-item label="催办原因">
            <el-input
              v-model="urgeForm.reason"
              type="textarea"
              :rows="3"
              placeholder="请说明催办的原因（必填）"
            ></el-input>
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="urgeDialogVisible = false">取消</el-button>
          <el-button type="primary" @click="handleUrgeSubmit">确认催办</el-button>
        </div>
      </el-dialog>

      <!-- 催办记录弹窗 -->
      <el-dialog title="催办记录" :visible.sync="urgeHistoryDialogVisible" width="800px">
        <div v-if="currentUrgeHistoryRow">
          <el-descriptions :column="2" border style="margin-bottom: 20px">
            <el-descriptions-item label="员工姓名">
              {{ currentUrgeHistoryRow.name }}
            </el-descriptions-item>
            <el-descriptions-item label="工号">
              {{ currentUrgeHistoryRow.employeeId }}
            </el-descriptions-item>
            <el-descriptions-item label="部门">
              {{ currentUrgeHistoryRow.department }}
            </el-descriptions-item>
            <el-descriptions-item label="总催办次数">
              {{ currentUrgeHistoryRow.totalUrgeCount }}
            </el-descriptions-item>
          </el-descriptions>

          <h4>催办历史记录</h4>
          <el-table :data="urgeHistoryList" border stripe>
            <el-table-column type="index" label="序号" width="60" align="center"></el-table-column>
            <el-table-column
              prop="urgeTime"
              label="催办时间"
              width="150"
              align="center"
            ></el-table-column>
            <el-table-column
              prop="urgePerson"
              label="催办人"
              width="120"
              align="center"
            ></el-table-column>
          </el-table>
        </div>
        <div slot="footer" class="dialog-footer">
          <el-button @click="urgeHistoryDialogVisible = false">关闭</el-button>
        </div>
      </el-dialog>

      <!-- 预审弹窗 -->
      <el-dialog
        title="员工资料预审"
        :visible.sync="preReviewDialogVisible"
        width="900px"
        :close-on-click-modal="false"
      >
        <div v-if="currentPreReviewEmployee">
          <!-- 员工基本信息 -->
          <el-card class="employee-info-card" shadow="never">
            <div slot="header">
              <span style="font-weight: 600">员工基本信息</span>
            </div>
            <el-row :gutter="20">
              <el-col :span="8">
                <div class="info-item">
                  <span class="info-label">姓名：</span>
                  <span class="info-value">{{ currentPreReviewEmployee.name }}</span>
                </div>
              </el-col>
              <el-col :span="8">
                <div class="info-item">
                  <span class="info-label">工号：</span>
                  <span class="info-value">{{ currentPreReviewEmployee.employeeId }}</span>
                </div>
              </el-col>
              <el-col :span="8">
                <div class="info-item">
                  <span class="info-label">部门：</span>
                  <span class="info-value">{{ currentPreReviewEmployee.department }}</span>
                </div>
              </el-col>
            </el-row>
            <el-row :gutter="20">
              <el-col :span="8">
                <div class="info-item">
                  <span class="info-label">机构：</span>
                  <span class="info-value">{{ currentPreReviewEmployee.organization }}</span>
                </div>
              </el-col>
              <el-col :span="8">
                <div class="info-item">
                  <span class="info-label">批次：</span>
                  <span class="info-value">{{ currentPreReviewEmployee.batch }}</span>
                </div>
              </el-col>
              <el-col :span="8">
                <div class="info-item">
                  <span class="info-label">提交时间：</span>
                  <span class="info-value">{{ currentPreReviewEmployee.submitTime }}</span>
                </div>
              </el-col>
            </el-row>
          </el-card>

          <!-- 上传资料审核 -->
          <el-card class="review-card" shadow="never">
            <div slot="header">
              <span style="font-weight: 600">上传资料审核</span>
            </div>

            <!-- 征信报告文件 -->
            <div class="review-item">
              <div class="review-header">
                <span class="review-title">征信报告文件</span>
                <div class="review-actions">
                  <el-button type="text" size="small" @click="viewDocument('credit-report')">
                    查看原文件
                  </el-button>
                </div>
              </div>
              <div class="review-status">
                <el-radio-group v-model="reviewForm.creditReport">
                  <el-radio label="pass">通过</el-radio>
                  <el-radio label="reject">不通过</el-radio>
                </el-radio-group>
              </div>
              <div class="review-comment">
                <el-input
                  v-model="reviewForm.creditReportComment"
                  type="textarea"
                  :rows="2"
                  placeholder="请输入审核意见（不通过时必填）"
                ></el-input>
              </div>
            </div>

            <!-- 无犯罪记录证明 -->
            <div class="review-item">
              <div class="review-header">
                <span class="review-title">无犯罪记录证明</span>
                <div class="review-actions">
                  <el-button type="text" size="small" @click="viewDocument('criminal-record')">
                    查看原文件
                  </el-button>
                </div>
              </div>
              <div class="review-status">
                <el-radio-group v-model="reviewForm.criminalRecord">
                  <el-radio label="pass">通过</el-radio>
                  <el-radio label="reject">不通过</el-radio>
                </el-radio-group>
              </div>
              <div class="review-comment">
                <el-input
                  v-model="reviewForm.criminalRecordComment"
                  type="textarea"
                  :rows="2"
                  placeholder="请输入审核意见（不通过时必填）"
                ></el-input>
              </div>
            </div>

            <!-- 经商办企业情况截图 -->
            <div class="review-item">
              <div class="review-header">
                <span class="review-title">经商办企业情况截图</span>
                <div class="review-actions">
                  <el-button type="text" size="small" @click="viewDocument('business-status')">
                    查看原文件
                  </el-button>
                </div>
              </div>
              <div class="review-status">
                <el-radio-group v-model="reviewForm.businessStatus">
                  <el-radio label="pass">通过</el-radio>
                  <el-radio label="reject">不通过</el-radio>
                </el-radio-group>
              </div>
              <div class="review-comment">
                <el-input
                  v-model="reviewForm.businessStatusComment"
                  type="textarea"
                  :rows="2"
                  placeholder="请输入审核意见（不通过时必填）"
                ></el-input>
              </div>
            </div>

            <!-- 保险从业情况截图 -->
            <div class="review-item">
              <div class="review-header">
                <span class="review-title">保险从业情况截图</span>
                <div class="review-actions">
                  <el-button type="text" size="small" @click="viewDocument('insurance-status')">
                    查看原文件
                  </el-button>
                </div>
              </div>
              <div class="review-status">
                <el-radio-group v-model="reviewForm.insuranceStatus">
                  <el-radio label="pass">通过</el-radio>
                  <el-radio label="reject">不通过</el-radio>
                </el-radio-group>
              </div>
              <div class="review-comment">
                <el-input
                  v-model="reviewForm.insuranceStatusComment"
                  type="textarea"
                  :rows="2"
                  placeholder="请输入审核意见（不通过时必填）"
                ></el-input>
              </div>
            </div>

            <!-- 法院涉诉情况截图 -->
            <div class="review-item">
              <div class="review-header">
                <span class="review-title">法院涉诉情况截图</span>
                <div class="review-actions">
                  <el-button type="text" size="small" @click="viewDocument('court-status')">
                    查看原文件
                  </el-button>
                </div>
              </div>
              <div class="review-status">
                <el-radio-group v-model="reviewForm.courtStatus">
                  <el-radio label="pass">通过</el-radio>
                  <el-radio label="reject">不通过</el-radio>
                </el-radio-group>
              </div>
              <div class="review-comment">
                <el-input
                  v-model="reviewForm.courtStatusComment"
                  type="textarea"
                  :rows="2"
                  placeholder="请输入审核意见（不通过时必填）"
                ></el-input>
              </div>
            </div>

            <!-- 补充材料 -->
            <div
              class="review-item"
              v-if="currentPreReviewEmployee.supplementaryMaterials && currentPreReviewEmployee.supplementaryMaterials.length > 0"
            >
              <div class="review-header">
                <span class="review-title">补充材料</span>
                <div class="review-actions">
                  <el-button type="text" size="small" @click="viewDocument('supplementary')">
                    查看原文件
                  </el-button>
                </div>
              </div>
              <div class="review-status">
                <el-radio-group v-model="reviewForm.supplementary">
                  <el-radio label="pass">通过</el-radio>
                  <el-radio label="reject">不通过</el-radio>
                </el-radio-group>
              </div>
              <div class="review-comment">
                <el-input
                  v-model="reviewForm.supplementaryComment"
                  type="textarea"
                  :rows="2"
                  placeholder="请输入审核意见（不通过时必填）"
                ></el-input>
              </div>
            </div>
          </el-card>
        </div>
        <div slot="footer" class="dialog-footer">
          <el-button @click="preReviewDialogVisible = false">取消</el-button>
          <el-button type="primary" @click="submitPreReview">确定</el-button>
        </div>
      </el-dialog>

      <!-- 参数变更历史弹窗 -->
      <el-dialog title="参数变更历史" :visible.sync="paramHistoryDialogVisible" width="900px">
        <el-table :data="paramHistoryList" border stripe>
          <el-table-column type="index" label="序号" width="60" align="center"></el-table-column>
          <el-table-column
            prop="changeTime"
            label="变更时间"
            width="160"
            align="center"
          ></el-table-column>
          <el-table-column
            prop="changeBy"
            label="变更人"
            width="140"
            align="center"
          ></el-table-column>
          <el-table-column prop="changeType" label="变更类型" width="140" align="center">
            <template slot-scope="scope">
              <el-tag size="small">{{ scope.row.changeType }}</el-tag>
            </template>
          </el-table-column>
          <el-table-column
            prop="changeContent"
            label="变更内容"
            min-width="200"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="changeReason"
            label="变更原因"
            min-width="250"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="effectTime"
            label="生效时间"
            width="160"
            align="center"
          ></el-table-column>
          <el-table-column
            label="操作"
            width="120"
            align="center"
            fixed="right"
            class-name="operation-column"
          >
            <template slot-scope="scope">
              <div class="operation-buttons">
                <el-button type="text" size="small" @click="handleViewParamDetail(scope.row)">
                  查看详情
                </el-button>
              </div>
            </template>
          </el-table-column>
        </el-table>
        <div slot="footer" class="dialog-footer">
          <el-button type="primary" @click="paramHistoryDialogVisible = false">关 闭</el-button>
        </div>
      </el-dialog>
    </div>

    <script>
      // 确保Vue和Element UI加载完成后再创建实例
      window.onload = function () {
        // 检查Vue是否已加载
        if (typeof Vue === 'undefined') {
          console.error('Vue库未加载，请检查网络连接或CDN链接')
          return
        }

        // 检查Element UI是否已加载
        if (typeof ELEMENT === 'undefined') {
          console.error('Element UI库未加载，请检查网络连接或CDN链接')
          return
        }

        new Vue({
          el: '#app',
          data() {
            // 验证修改原因字数
            const validateReason = (rule, value, callback) => {
              if (!value) {
                callback(new Error('请输入修改原因'))
              } else if (value.length < 10) {
                callback(new Error('修改原因不少于10字'))
              } else {
                callback()
              }
            }

            return {
              activeMenu: 'org-statistics',

              // 用户管理页面数据
              userFilterForm: {
                org: [],
                selectedOrgPath: '',
                currentOrgKey: null,
                tempOrgKey: null,
                tempOrgPath: null,
                dept: '',
                role: '',
                status: '',
                keyword: '',
              },
              userOrgPopoverVisible: false, // 用户管理机构选择浮窗显示状态
              userList: [],
              userCurrentPage: 1,
              userPageSize: 10,
              userTotal: 0,
              addUserDialogVisible: false,
              editRoleDialogVisible: false,
              addUserForm: {
                keyword: '',
                selectedUser: null,
                role: '',
                description: '',
              },
              editRoleForm: {
                userId: '',
                name: '',
                jobNumber: '',
                oldRole: '',
                newRole: [],
                reason: '',
              },
              roleList: [
                {
                  id: 'reviewer',
                  name: '综合员',
                  code: 'reviewer',
                  description: '负责对员工上报材料的完整性进行预审，驳回不完整材料',
                  userCount: 8,
                  permissions: ['system-user-view', 'mobile-review-all'],
                },
                {
                  id: 'dept_leader',
                  name: '部门负责人',
                  code: 'dept_leader',
                  description: '各分支机构、部门负责人，查看本部门员工的相关数据',
                  userCount: 15,
                  permissions: ['mobile-monitor-view'],
                },
                {
                  id: 'hr_admin',
                  name: '人力管理员',
                  code: 'hr_admin',
                  description: '人力资源部门管理人员，负责系统管理、参数维护、异常预警处理',
                  userCount: 5,
                  permissions: ['system-all', 'ledger-all', 'mobile-all'],
                },
              ],
              currentRole: null,
              permissionTree: [
                {
                  id: 'system',
                  label: '系统管理',
                  children: [
                    {
                      id: 'system-user',
                      label: '用户管理',
                      children: [
                        { id: 'system-user-view', label: '查看' },
                        { id: 'system-user-add', label: '添加' },
                        { id: 'system-user-edit', label: '修改' },
                        { id: 'system-user-remove', label: '移除' },
                        { id: 'system-user-enable', label: '启用/禁用' },
                        { id: 'system-user-permission', label: '权限配置' },
                      ],
                    },
                    {
                      id: 'system-param',
                      label: '参数配置',
                      children: [
                        { id: 'system-param-view', label: '查看' },
                        { id: 'system-param-edit', label: '编辑' },
                      ],
                    },
                  ],
                },
                {
                  id: 'statistics',
                  label: '统计',
                  children: [
                    {
                      id: 'employee-submission',
                      label: '台账明细管理',
                      children: [
                        { id: 'submission-view', label: '查看' },
                        { id: 'submission-urge', label: '催办' },
                        { id: 'submission-export', label: '导出' },
                        { id: 'submission-materials', label: '查看资料' },
                      ],
                    },
                    {
                      id: 'ledger-manage',
                      label: '台账管理',
                      children: [
                        { id: 'ledger-view', label: '查看' },
                        { id: 'ledger-edit', label: '编辑' },
                        { id: 'ledger-export', label: '导出' },
                        { id: 'ledger-history', label: '修改记录' },
                      ],
                    },
                  ],
                },
                {
                  id: 'mobile',
                  label: '移动端功能',
                  children: [
                    {
                      id: 'mobile-report',
                      label: '资料上报',
                      children: [
                        { id: 'mobile-report-submit', label: '上报' },
                        { id: 'mobile-report-view', label: '查看' },
                      ],
                    },
                    {
                      id: 'mobile-review',
                      label: '预审管理',
                      children: [
                        { id: 'mobile-review-view', label: '查看' },
                        { id: 'mobile-review-audit', label: '审核' },
                        { id: 'mobile-review-reject', label: '驳回' },
                        { id: 'mobile-review-submit', label: '提交' },
                      ],
                    },
                    {
                      id: 'mobile-monitor',
                      label: '监控管理',
                      children: [{ id: 'mobile-monitor-view', label: '查看' }],
                    },
                  ],
                },
              ],

              // 参数配置页面数据
              paramActiveTab: 'score',
              scoreParams: [],
              warningLevelRules: [
                {
                  level: '正常',
                  condition: '分数 ≥ 85',
                  defaultValue: 85,
                  currentValue: 85,
                  description: '正常状态，无需关注',
                },
                {
                  level: '必要关注',
                  condition: '75 ≤ 分数 < 85',
                  defaultValue: 75,
                  currentValue: 75,
                  description: '需要关注，建议定期检查',
                },
                {
                  level: '一级预警',
                  condition: '60 ≤ 分数 < 75',
                  defaultValue: 60,
                  currentValue: 60,
                  description: '高风险等级，需要重点关注',
                },
                {
                  level: '二级预警',
                  condition: '45 ≤ 分数 < 60',
                  defaultValue: 45,
                  currentValue: 45,
                  description: '中等风险等级，需要重点关注',
                },
                {
                  level: '三级预警',
                  condition: '分数 < 45',
                  defaultValue: 45,
                  currentValue: 45,
                  description: '较低风险等级，建议跟进',
                },
              ],
              warningThresholds: [],
              calculatorDialogVisible: false,
              paramHistoryDialogVisible: false,
              paramHistoryList: [],
              calculatorForm: {
                testData: {
                  creditCards: 0,
                  otherLoans: 0,
                  overdueAccounts: 0,
                  overdue90: 0,
                  creditUsed: 0,
                  queries: 0,
                },
                result: null,
              },

              // 台账管理筛选表单
              filterForm: {
                yearBatch: [],
                batch: [],
                dateRange: [],
                organization: [],
                selectedOrgPath: '',
                currentOrgKey: null,
                tempOrgKey: null, // 临时保存选中的机构key
                tempOrgPath: null, // 临时保存选中的机构路径
                department: '',
                isBranchSelected: false,
                warningLevel: [],
                verified: '',
                name: '',
                employeeId: '',
              },

              // 机构树形数据（用于用户管理）
              orgTree: [
                {
                  value: '江苏省分行',
                  label: '江苏省分行',
                  children: [
                    { value: '南京市分行', label: '南京市分行' },
                    { value: '苏州市分行', label: '苏州市分行' },
                    { value: '无锡市分行', label: '无锡市分行' },
                    { value: '常州市分行', label: '常州市分行' },
                  ],
                },
              ],

              // 台账明细管理相关数据
              submissionPageKey: 0,
              ledgerOrgPopoverVisible: false, // 台账明细管理机构选择浮窗显示状态

              // 排查批次管理相关数据
              batchLoading: false,
              batchList: [
                {
                  id: 1,
                  name: '南京市分行2025年第一批次',
                  organization: '南京市分行',
                  creator: '张三(12345678)',
                  createTime: '2025-01-15 09:30:00',
                  startTime: '2025-01-15',
                  endTime: '2025-01-25',
                  status: '进行中',
                  employeeCount: 150,
                  completedCount: 120,
                  pendingCount: 30,
                  warningCount: 8,
                },
                {
                  id: 2,
                  name: '江苏省分行2025年第一批次',
                  organization: '江苏省分行',
                  creator: '李四(87654321)',
                  createTime: '2025-01-10 14:20:00',
                  startTime: '2025-01-10',
                  endTime: '2025-01-20',
                  status: '已结束',
                  employeeCount: 500,
                  completedCount: 480,
                  pendingCount: 20,
                  warningCount: 25,
                },
                {
                  id: 3,
                  name: '苏州市分行2025年第一批次',
                  organization: '苏州市分行',
                  creator: '王五(11111111)',
                  createTime: '2025-01-12 16:45:00',
                  startTime: '2025-01-12',
                  endTime: '2025-01-22',
                  status: '进行中',
                  employeeCount: 200,
                  completedCount: 150,
                  pendingCount: 50,
                  warningCount: 12,
                },
              ],
              batchCurrentPage: 1,
              batchPageSize: 10,
              batchTotal: 3,
              selectedBatches: [],

              // 批次管理弹窗相关数据
              addBatchDialogVisible: false,
              editBatchDialogVisible: false,
              batchDetailDialogVisible: false,
              currentBatchDetail: null,

              // 新增批次表单
              addBatchForm: {
                name: '',
                organization: '江苏省分行',
                creator: '李四(87654321)',
                startTime: '',
                endTime: '',
                description: '',
                participantList: [],
                materials: [],
              },

              // 编辑批次表单
              editBatchForm: {
                id: null,
                name: '',
                endTime: '',
                description: '',
                status: '进行中',
                reason: '',
              },

              // 表单验证规则
              addBatchRules: {
                name: [{ required: true, message: '请输入批次名称', trigger: 'blur' }],
                startTime: [{ required: true, message: '请选择开始时间', trigger: 'change' }],
                departments: [{ required: true, message: '请选择参与部门', trigger: 'change' }],
              },

              editBatchRules: {
                name: [{ required: true, message: '请输入批次名称', trigger: 'blur' }],
                reason: [{ required: true, message: '请输入修改原因', trigger: 'blur' }],
              },
              submissionFilterForm: {
                batch: ['2025Q1'],
                organization: [],
                selectedOrgPath: '',
                currentOrgKey: null,
                tempOrgKey: null,
                tempOrgPath: null,
                department: '',
                status: '',
                name: '',
                employeeId: '',
              },
              submissionOrgPopoverVisible: false, // 排查资料管理机构选择浮窗显示状态
              submissionStats: {
                totalEmployees: 156,
                submittedCount: 142,
                notSubmittedCount: 14,
                specialAttention: 8,
                level1Warning: 8,
                level2Warning: 12,
                level3Warning: 6,
              },
              submissionOrganizationOptions: [
                {
                  value: '江苏省分行',
                  label: '江苏省分行',
                  children: [
                    { value: '南京市分行', label: '南京市分行' },
                    { value: '苏州市分行', label: '苏州市分行' },
                    { value: '无锡市分行', label: '无锡市分行' },
                    { value: '常州市分行', label: '常州市分行' },
                  ],
                },
              ],
              submissionTableData: [
                {
                  index: 1,
                  name: '王**',
                  employeeId: '20080846050',
                  organization: '苏州市分行',
                  department: '相城区支行',
                  batch: '南京市分行2025年第一批次',
                  status: '待预审',
                  submitTime: '2025-01-15 09:30:25',
                  warningLevel: '三级预警',
                  criminalRecord: '有',
                  insuranceIntermediary: '无',
                  enforcementInfo: '无',
                  businessOperation: '无',
                  fraudCriminal: '无',
                  fraudBusiness: '无',
                  lastUrgeTime: '-',
                  urgeCount: 0,
                  creditReport: {
                    size: '1.2MB',
                    format: 'PDF',
                    uploadTime: '2025-01-15 09:30:25',
                  },
                  criminalRecordFile: {
                    size: '856KB',
                    format: 'JPG',
                    uploadTime: '2025-01-15 09:35:10',
                  },
                  businessScreenshot: {
                    size: '1.5MB',
                    format: 'PNG',
                    uploadTime: '2025-01-15 09:40:15',
                  },
                  supplementaryMaterials: null,
                },
                {
                  index: 2,
                  name: '李**',
                  employeeId: '20080846051',
                  organization: '苏州市分行',
                  department: '办公室',
                  batch: '南京市分行2025年第一批次',
                  status: '待预审',
                  submitTime: '2025-01-16 10:15:30',
                  warningLevel: '二级预警',
                  criminalRecord: '无',
                  insuranceIntermediary: '有',
                  enforcementInfo: '无',
                  businessOperation: '无',
                  fraudCriminal: '无',
                  fraudBusiness: '无',
                  lastUrgeTime: '-',
                  urgeCount: 0,
                  creditReport: {
                    size: '1.1MB',
                    format: 'PDF',
                    uploadTime: '2025-01-16 10:15:30',
                  },
                  criminalRecordFile: {
                    size: '920KB',
                    format: 'JPG',
                    uploadTime: '2025-01-16 10:20:45',
                  },
                  businessScreenshot: null,
                  supplementaryMaterials: {
                    size: '2.1MB',
                    format: 'DOCX',
                    uploadTime: '2025-01-16 10:25:20',
                  },
                },
                {
                  index: 3,
                  name: '张**',
                  employeeId: '20080846052',
                  organization: '苏州市分行',
                  department: '公司金融部',
                  batch: '南京市分行2025年第一批次',
                  status: '未上报',
                  submitTime: '-',
                  warningLevel: '正常',
                  criminalRecord: '无',
                  insuranceIntermediary: '无',
                  enforcementInfo: '有',
                  businessOperation: '无',
                  fraudCriminal: '有',
                  fraudBusiness: '有',
                  lastUrgeTime: '2025-01-20 14:30:00',
                  urgeCount: 2,
                  creditReport: null,
                  criminalRecordFile: null,
                  businessScreenshot: null,
                  supplementaryMaterials: null,
                },
                {
                  index: 4,
                  name: '赵**',
                  employeeId: '20080846053',
                  organization: '苏州市分行',
                  department: '个人金融部',
                  batch: '南京市分行2025年第一批次',
                  status: '待预审',
                  submitTime: '2025-01-18 11:45:15',
                  warningLevel: '正常',
                  criminalRecord: '无',
                  insuranceIntermediary: '无',
                  enforcementInfo: '无',
                  businessOperation: '无',
                  fraudCriminal: '无',
                  fraudBusiness: '无',
                  lastUrgeTime: '-',
                  urgeCount: 0,
                  creditReport: {
                    size: '1.3MB',
                    format: 'PDF',
                    uploadTime: '2025-01-18 11:45:15',
                  },
                  criminalRecordFile: {
                    size: '780KB',
                    format: 'JPG',
                    uploadTime: '2025-01-18 11:50:30',
                  },
                  businessScreenshot: {
                    size: '1.2MB',
                    format: 'PNG',
                    uploadTime: '2025-01-18 11:55:45',
                  },
                  supplementaryMaterials: null,
                },
                {
                  index: 5,
                  name: '孙**',
                  employeeId: '20080846054',
                  organization: '苏州市分行',
                  department: '风险管理部',
                  batch: '南京市分行2025年第一批次',
                  status: '未上报',
                  submitTime: '-',
                  warningLevel: '正常',
                  criminalRecord: '无',
                  insuranceIntermediary: '无',
                  enforcementInfo: '无',
                  businessOperation: '无',
                  fraudCriminal: '无',
                  fraudBusiness: '无',
                  lastUrgeTime: '2025-01-22 16:20:00',
                  urgeCount: 1,
                  creditReport: null,
                  criminalRecordFile: null,
                  businessScreenshot: null,
                  supplementaryMaterials: null,
                },
                {
                  index: 6,
                  name: '陈**',
                  employeeId: '20080846055',
                  organization: '南京市分行',
                  department: '信贷管理部',
                  batch: '南京市分行2025年第一批次',
                  status: '待预审',
                  submitTime: '2025-01-20 14:20:10',
                  warningLevel: '必要关注',
                  criminalRecord: '无',
                  insuranceIntermediary: '无',
                  enforcementInfo: '无',
                  businessOperation: '有',
                  fraudCriminal: '无',
                  fraudBusiness: '无',
                  lastUrgeTime: '-',
                  urgeCount: 0,
                  creditReport: {
                    size: '1.4MB',
                    format: 'PDF',
                    uploadTime: '2025-01-20 14:20:10',
                  },
                  criminalRecordFile: {
                    size: '890KB',
                    format: 'JPG',
                    uploadTime: '2025-01-20 14:25:30',
                  },
                  businessScreenshot: {
                    size: '1.8MB',
                    format: 'PNG',
                    uploadTime: '2025-01-20 14:30:45',
                  },
                  supplementaryMaterials: null,
                },
                {
                  index: 7,
                  name: '杨**',
                  employeeId: '20080846056',
                  organization: '无锡市分行',
                  department: '个人金融部',
                  batch: '南京市分行2025年第一批次',
                  status: '分析中',
                  submitTime: '2025-01-21 09:15:25',
                  warningLevel: '一级预警',
                  criminalRecord: '无',
                  insuranceIntermediary: '有',
                  enforcementInfo: '无',
                  businessOperation: '无',
                  fraudCriminal: '无',
                  fraudBusiness: '无',
                  lastUrgeTime: '-',
                  urgeCount: 0,
                  creditReport: {
                    size: '1.2MB',
                    format: 'PDF',
                    uploadTime: '2025-01-21 09:15:25',
                  },
                  criminalRecordFile: {
                    size: '950KB',
                    format: 'JPG',
                    uploadTime: '2025-01-21 09:20:40',
                  },
                  businessScreenshot: {
                    size: '1.6MB',
                    format: 'PNG',
                    uploadTime: '2025-01-21 09:25:55',
                  },
                  supplementaryMaterials: null,
                },
              ],
              submissionLoading: false,
              submissionPagination: {
                currentPage: 1,
                pageSize: 10,
                total: 6,
              },
              selectedEmployees: [],
              materialsDialogVisible: false,
              currentMaterialsRow: null,
              urgeDialogVisible: false,
              urgeForm: {
                target: '',
                template: '',
                content: '',
                methods: [],
                timeType: 'immediate',
                scheduledTime: null,
                reason: '',
              },
              urgeHistoryDialogVisible: false,
              currentUrgeHistoryRow: null,

              // 预审相关数据
              preReviewDialogVisible: false,
              currentPreReviewEmployee: null,
              reviewForm: {
                creditReport: '',
                creditReportComment: '',
                criminalRecord: '',
                criminalRecordComment: '',
                businessStatus: '',
                businessStatusComment: '',
                insuranceStatus: '',
                insuranceStatusComment: '',
                courtStatus: '',
                courtStatusComment: '',
                supplementary: '',
                supplementaryComment: '',
              },
              urgeHistoryList: [
                {
                  urgeTime: '2025-01-20 14:30:00',
                  urgePerson: '张管理员',
                },
                {
                  urgeTime: '2025-01-22 16:20:00',
                  urgePerson: '张管理员',
                },
              ],

              // 机构树形数据（用于台账管理）
              organizationOptions: [
                {
                  value: '江苏省分行',
                  label: '江苏省分行',
                  children: [
                    { value: '南京市分行', label: '南京市分行' },
                    { value: '苏州市分行', label: '苏州市分行' },
                    { value: '无锡市分行', label: '无锡市分行' },
                    { value: '常州市分行', label: '常州市分行' },
                  ],
                },
              ],

              // 表格数据
              tableData: [],
              allTableData: [], // 存储所有数据
              selectedRows: [],

              // 分页
              currentPage: 1,
              pageSize: 10,
              total: 0,

              // 编辑弹窗
              editDialogVisible: false,
              editForm: {
                fieldName: '',
                oldValue: '',
                newValue: '',
                reason: '',
                fileList: [],
                rowData: null,
              },
              editRules: {
                newValue: [{ required: true, message: '请输入新值', trigger: 'blur' }],
                reason: [{ required: true, validator: validateReason, trigger: 'blur' }],
              },
              uploadAction: '#',

              // 修改记录弹窗
              historyDialogVisible: false,
              historyList: [],

              // 详情弹窗
              detailDialogVisible: false,
              currentDetailRow: null,

              // 排查汇总统计页面数据
              orgStatisticsFilterForm: {
                year: '',
                initiatingOrg: [],
                batch: [],
                granularity: '',
                organization: [],
                organizationCheckedKeys: [], // 已选中的机构key数组
                selectedOrgPaths: '', // 显示的选中路径文本
                tempCheckedKeys: [], // 临时保存选中的keys
                department: [],
                warningIndicator: [],
              },
              orgStatisticsOrgPopoverVisible: false, // 排查汇总统计机构选择浮窗显示状态
              orgStatisticsData: [
                {
                  index: 1,
                  initiatingOrg: '江苏省分行',
                  batch: '江苏省分行2025年第一批次',
                  organization: '南京市分行',
                  department: '',
                  checkCount: 456,
                  attentionCount: 12,
                  warningTotalCount: 12,
                  level1Warning: 8,
                  level2Warning: 2,
                  level3Warning: 2,
                  attentionRate: 2.63,
                  warningTotalRate: 2.63,
                  level1WarningRate: 1.75,
                  level2WarningRate: 0.44,
                  level3WarningRate: 0.44,
                  averageScore: 76.8,
                },
                {
                  index: 2,
                  initiatingOrg: '江苏省分行',
                  batch: '江苏省分行2025年第一批次',
                  organization: '无锡市分行',
                  department: '',
                  checkCount: 398,
                  attentionCount: 8,
                  warningTotalCount: 8,
                  level1Warning: 5,
                  level2Warning: 2,
                  level3Warning: 1,
                  attentionRate: 2.01,
                  warningTotalRate: 2.01,
                  level1WarningRate: 1.26,
                  level2WarningRate: 0.5,
                  level3WarningRate: 0.25,
                  averageScore: 78.5,
                },
                {
                  index: 3,
                  initiatingOrg: '江苏省分行',
                  batch: '江苏省分行2025年第一批次',
                  organization: '苏州市分行',
                  department: '',
                  checkCount: 523,
                  attentionCount: 15,
                  warningTotalCount: 15,
                  level1Warning: 10,
                  level2Warning: 3,
                  level3Warning: 2,
                  attentionRate: 2.87,
                  warningTotalRate: 2.87,
                  level1WarningRate: 1.91,
                  level2WarningRate: 0.57,
                  level3WarningRate: 0.38,
                  averageScore: 75.2,
                },
                {
                  index: 4,
                  initiatingOrg: '江苏省分行',
                  batch: '江苏省分行2025年第一批次',
                  organization: '常州市分行',
                  department: '',
                  checkCount: 312,
                  attentionCount: 6,
                  warningTotalCount: 6,
                  level1Warning: 4,
                  level2Warning: 1,
                  level3Warning: 1,
                  attentionRate: 1.92,
                  warningTotalRate: 1.92,
                  level1WarningRate: 1.28,
                  level2WarningRate: 0.32,
                  level3WarningRate: 0.32,
                  averageScore: 80.3,
                },
                {
                  index: 5,
                  initiatingOrg: '江苏省分行',
                  batch: '江苏省分行2025年第一批次',
                  organization: '南通市分行',
                  department: '',
                  checkCount: 387,
                  attentionCount: 9,
                  warningTotalCount: 9,
                  level1Warning: 6,
                  level2Warning: 2,
                  level3Warning: 1,
                  attentionRate: 2.33,
                  warningTotalRate: 2.33,
                  level1WarningRate: 1.55,
                  level2WarningRate: 0.52,
                  level3WarningRate: 0.26,
                  averageScore: 77.9,
                },
                {
                  index: 6,
                  initiatingOrg: '江苏省分行',
                  batch: '江苏省分行2025年第一批次',
                  organization: '徐州市分行',
                  department: '',
                  checkCount: 445,
                  attentionCount: 11,
                  warningTotalCount: 11,
                  level1Warning: 7,
                  level2Warning: 2,
                  level3Warning: 2,
                  attentionRate: 2.47,
                  warningTotalRate: 2.47,
                  level1WarningRate: 1.57,
                  level2WarningRate: 0.45,
                  level3WarningRate: 0.45,
                  averageScore: 76.5,
                },
                {
                  index: 7,
                  initiatingOrg: '江苏省分行',
                  batch: '江苏省分行2025年第一批次',
                  organization: '盐城市分行',
                  department: '',
                  checkCount: 356,
                  attentionCount: 7,
                  warningTotalCount: 7,
                  level1Warning: 5,
                  level2Warning: 1,
                  level3Warning: 1,
                  attentionRate: 1.97,
                  warningTotalRate: 1.97,
                  level1WarningRate: 1.4,
                  level2WarningRate: 0.28,
                  level3WarningRate: 0.28,
                  averageScore: 79.1,
                },
                {
                  index: 8,
                  initiatingOrg: '江苏省分行',
                  batch: '江苏省分行2025年第一批次',
                  organization: '扬州市分行',
                  department: '',
                  checkCount: 289,
                  attentionCount: 5,
                  warningTotalCount: 5,
                  level1Warning: 3,
                  level2Warning: 1,
                  level3Warning: 1,
                  attentionRate: 1.73,
                  warningTotalRate: 1.73,
                  level1WarningRate: 1.04,
                  level2WarningRate: 0.35,
                  level3WarningRate: 0.35,
                  averageScore: 81.6,
                },
                {
                  index: 9,
                  initiatingOrg: '江苏省分行',
                  batch: '江苏省分行2025年第一批次',
                  organization: '镇江市分行',
                  department: '',
                  checkCount: 267,
                  attentionCount: 4,
                  warningTotalCount: 4,
                  level1Warning: 3,
                  level2Warning: 1,
                  level3Warning: 0,
                  attentionRate: 1.5,
                  warningTotalRate: 1.5,
                  level1WarningRate: 1.12,
                  level2WarningRate: 0.37,
                  level3WarningRate: 0,
                  averageScore: 83.4,
                },
                {
                  index: 10,
                  initiatingOrg: '江苏省分行',
                  batch: '江苏省分行2025年第一批次',
                  organization: '泰州市分行',
                  department: '',
                  checkCount: 298,
                  attentionCount: 6,
                  warningTotalCount: 6,
                  level1Warning: 4,
                  level2Warning: 1,
                  level3Warning: 1,
                  attentionRate: 2.01,
                  warningTotalRate: 2.01,
                  level1WarningRate: 1.34,
                  level2WarningRate: 0.34,
                  level3WarningRate: 0.34,
                  averageScore: 80.2,
                },
                {
                  index: 11,
                  initiatingOrg: '江苏省分行',
                  batch: '江苏省分行2025年第一批次',
                  organization: '淮安市分行',
                  department: '',
                  checkCount: 334,
                  attentionCount: 7,
                  warningTotalCount: 7,
                  level1Warning: 5,
                  level2Warning: 1,
                  level3Warning: 1,
                  attentionRate: 2.1,
                  warningTotalRate: 2.1,
                  level1WarningRate: 1.5,
                  level2WarningRate: 0.3,
                  level3WarningRate: 0.3,
                  averageScore: 78.7,
                },
                {
                  index: 12,
                  initiatingOrg: '江苏省分行',
                  batch: '江苏省分行2025年第一批次',
                  organization: '连云港市分行',
                  department: '',
                  checkCount: 276,
                  attentionCount: 5,
                  warningTotalCount: 5,
                  level1Warning: 3,
                  level2Warning: 1,
                  level3Warning: 1,
                  attentionRate: 1.81,
                  warningTotalRate: 1.81,
                  level1WarningRate: 1.09,
                  level2WarningRate: 0.36,
                  level3WarningRate: 0.36,
                  averageScore: 82.1,
                },
                {
                  index: 13,
                  initiatingOrg: '江苏省分行',
                  batch: '江苏省分行2025年第一批次',
                  organization: '宿迁市分行',
                  department: '',
                  checkCount: 245,
                  attentionCount: 4,
                  warningTotalCount: 4,
                  level1Warning: 2,
                  level2Warning: 1,
                  level3Warning: 1,
                  attentionRate: 1.63,
                  warningTotalRate: 1.63,
                  level1WarningRate: 0.82,
                  level2WarningRate: 0.41,
                  level3WarningRate: 0.41,
                  averageScore: 84.5,
                },
              ],
              orgStatisticsPagination: {
                currentPage: 1,
                pageSize: 20,
                total: 8,
              },

              // 四级机构树数据
              orgTreeData: [
                {
                  value: '江苏省分行',
                  label: '江苏省分行',
                  children: [
                    {
                      value: '南京市分行',
                      label: '南京市分行',
                      children: [
                        {
                          value: '南京市分行营业部',
                          label: '南京市分行营业部（一支）',
                          children: [
                            {
                              value: '南京市分行营业部第一网点',
                              label: '南京市分行营业部第一网点（二支）',
                            },
                            {
                              value: '南京市分行营业部第二网点',
                              label: '南京市分行营业部第二网点（二支）',
                            },
                            {
                              value: '南京市分行营业部第三网点',
                              label: '南京市分行营业部第三网点（二支）',
                            },
                          ],
                        },
                        {
                          value: '南京市分行江宁支行',
                          label: '南京市分行江宁支行（一支）',
                          children: [
                            {
                              value: '南京市分行江宁支行第一网点',
                              label: '南京市分行江宁支行第一网点（二支）',
                            },
                            {
                              value: '南京市分行江宁支行第二网点',
                              label: '南京市分行江宁支行第二网点（二支）',
                            },
                          ],
                        },
                      ],
                    },
                    {
                      value: '无锡市分行',
                      label: '无锡市分行',
                      children: [
                        {
                          value: '无锡市分行营业部',
                          label: '无锡市分行营业部（一支）',
                          children: [
                            {
                              value: '无锡市分行营业部第一网点',
                              label: '无锡市分行营业部第一网点（二支）',
                            },
                            {
                              value: '无锡市分行营业部第二网点',
                              label: '无锡市分行营业部第二网点（二支）',
                            },
                          ],
                        },
                        {
                          value: '无锡市分行江阴支行',
                          label: '无锡市分行江阴支行（一支）',
                          children: [
                            {
                              value: '无锡市分行江阴支行第一网点',
                              label: '无锡市分行江阴支行第一网点（二支）',
                            },
                          ],
                        },
                      ],
                    },
                    {
                      value: '徐州市分行',
                      label: '徐州市分行',
                      children: [
                        {
                          value: '徐州市分行营业部',
                          label: '徐州市分行营业部（一支）',
                          children: [
                            {
                              value: '徐州市分行营业部第一网点',
                              label: '徐州市分行营业部第一网点（二支）',
                            },
                            {
                              value: '徐州市分行营业部第二网点',
                              label: '徐州市分行营业部第二网点（二支）',
                            },
                          ],
                        },
                      ],
                    },
                  ],
                },
              ],
              orgTreeProps: {
                children: 'children',
                label: 'label',
              },

              // 统计看板相关数据
              dashboardFilterForm: {
                initiatingOrg: '江苏省分行',
                batch: '江苏省分行2025年第一批次',
                organization: [],
                selectedOrgPath: '江苏省分行 / 南京市分行',
                currentOrgKey: '南京市分行',
                tempOrgKey: null, // 临时保存选中的机构key
                tempOrgPath: null, // 临时保存选中的机构路径
                department: '市分行本部',
                isBranchSelected: false,
              },
              dashboardOrgPopoverVisible: false, // 统计看板机构选择浮窗显示状态
              dashboardData: {
                basicInfo: {
                  initiatingOrg: '江苏省分行',
                  batch: '江苏省分行2025年第一批次',
                  organization: '南京市分行',
                  department: '市分行本部',
                },
                checkProgress: {
                  totalCount: 150,
                  checkedCount: 100,
                  uncheckedCount: 50,
                  verifiedCount: 50,
                  completionRate: 66.67,
                  verificationRate: 50.0,
                },
                checkResults: {
                  checkedCount: 100,
                  normalCount: 80,
                  attentionCount: 10,
                  level1Warning: 5,
                  level2Warning: 3,
                  level3Warning: 2,
                  normalRate: 80.0,
                  attentionRate: 10.0,
                  warningRate: 10.0,
                },
                creditScore: {
                  averageScore: 18.17,
                  accountScore: 8.23,
                  creditCardScore: 7.56,
                  loanScore: 1.23,
                  repaymentScore: 0.18,
                  recordScore: 0.03,
                  queryScore: 0.91,
                  comparisonScore: 0.03,
                },
                otherProfile: {
                  criminalQueryCount: 3,
                  insuranceCount: 1,
                  enforcementCount: 1,
                  businessCount: 4,
                  fraudCriminalCount: 0,
                  fraudBusinessCount: 1,
                  criminalQueryRate: 3.0,
                  insuranceRate: 1.0,
                  enforcementRate: 1.0,
                  businessRate: 4.0,
                  fraudCriminalRate: 0.0,
                  fraudBusinessRate: 1.0,
                },
              },
            }
          },

          created() {
            this.initMockData()
            this.initUserData()
            this.initParamData()
            this.loadTableData()
          },

          methods: {
            // 台账明细管理相关方法
            handleSubmissionQuery() {
              // 重新加载数据，确保数据不会消失
              this.loadSubmissionData()
              this.$message.success('查询完成')
            },
            handleSubmissionReset() {
              this.submissionFilterForm = {
                batch: ['2025Q1'],
                organization: [],
                department: '',
                status: '',
                name: '',
                employeeId: '',
              }
              this.$message.info('筛选条件已重置')
            },
            handleSelectionChange(selection) {
              this.selectedEmployees = selection
            },
            handleBatchUrge() {
              if (this.selectedEmployees.length === 0) {
                this.$message.warning('请先选择要催办的员工')
                return
              }
              this.urgeForm.target = `批量催办 (${this.selectedEmployees.length}人)`
              this.urgeForm.content = '请尽快提交员工行为排查资料，截止时间为2025年1月25日。'
              this.urgeDialogVisible = true
            },
            handleBatchSubmit() {
              if (this.selectedEmployees.length === 0) {
                this.$message.warning('请先选择要提交的员工')
                return
              }
              this.$confirm(
                `确定要批量提交 ${this.selectedEmployees.length} 名员工的资料吗？`,
                '批量提交确认',
                {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                }
              )
                .then(() => {
                  // 执行批量提交逻辑
                  this.$message.success(
                    `成功批量提交 ${this.selectedEmployees.length} 名员工的资料`
                  )
                  this.selectedEmployees = []
                  this.loadSubmissionData()
                })
                .catch(() => {
                  this.$message.info('已取消批量提交')
                })
            },
            handleBatchSubmitSingle(row) {
              this.$confirm(`确定要提交员工"${row.name}"的资料吗？`, '批量提交确认', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning',
              })
                .then(() => {
                  // 执行单个批量提交逻辑
                  this.$message.success(`成功提交员工"${row.name}"的资料`)
                  row.status = '已完成'
                  this.loadSubmissionData()
                })
                .catch(() => {
                  this.$message.info('已取消提交')
                })
            },

            // 排查批次管理相关方法
            loadBatchData() {
              this.batchLoading = true
              // 模拟数据加载
              setTimeout(() => {
                this.batchLoading = false
              }, 1000)
            },
            showAddBatchDialog() {
              this.addBatchForm = {
                name: '',
                organization: '江苏省分行',
                creator: '李四(87654321)',
                startTime: '',
                endTime: '',
                description: '',
                participantList: [],
                materials: [],
              }
              this.addBatchDialogVisible = true
            },
            handleFileChange(file, fileList) {
              this.addBatchForm.participantList = fileList
            },
            handleAddBatch() {
              this.$refs.addBatchForm.validate((valid) => {
                if (valid) {
                  // 模拟新增批次
                  const newBatch = {
                    id: this.batchList.length + 1,
                    name: this.addBatchForm.name,
                    organization: this.addBatchForm.organization,
                    creator: this.addBatchForm.creator,
                    createTime: new Date().toLocaleString(),
                    startTime: this.addBatchForm.startTime,
                    endTime: this.addBatchForm.endTime || '',
                    status: '进行中',
                    employeeCount: 0,
                    completedCount: 0,
                    pendingCount: 0,
                    warningCount: 0,
                  }
                  this.batchList.unshift(newBatch)
                  this.batchTotal++
                  this.addBatchDialogVisible = false
                  this.$message.success('批次创建成功')
                }
              })
            },
            viewBatchDetail(row) {
              this.currentBatchDetail = row
              this.batchDetailDialogVisible = true
            },
            editBatch(row) {
              this.editBatchForm = {
                id: row.id,
                name: row.name,
                endTime: row.endTime,
                description: row.description || '',
                status: row.status,
                reason: '',
              }
              this.editBatchDialogVisible = true
            },
            handleEditBatch() {
              this.$refs.editBatchForm.validate((valid) => {
                if (valid) {
                  // 更新批次信息
                  const batch = this.batchList.find((b) => b.id === this.editBatchForm.id)
                  if (batch) {
                    batch.name = this.editBatchForm.name
                    batch.endTime = this.editBatchForm.endTime
                    batch.description = this.editBatchForm.description
                    batch.status = this.editBatchForm.status
                  }
                  this.editBatchDialogVisible = false
                  this.$message.success('批次信息更新成功')
                }
              })
            },
            endBatch(row) {
              this.$confirm(`确定要结束排查"${row.name}"吗？`, '结束排查确认', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning',
              })
                .then(() => {
                  row.status = '已结束'
                  this.$message.success('排查已结束')
                })
                .catch(() => {
                  this.$message.info('已取消操作')
                })
            },
            handleBatchSelectionChange(selection) {
              this.selectedBatches = selection
            },
            handleBatchSizeChange(val) {
              this.batchPageSize = val
              this.loadBatchData()
            },
            handleBatchCurrentChange(val) {
              this.batchCurrentPage = val
              this.loadBatchData()
            },

            // 计算持续时间
            getDuration(batch) {
              if (!batch.startTime) return '未开始'
              const start = new Date(batch.startTime)
              const end = batch.endTime ? new Date(batch.endTime) : new Date()
              const diffTime = end - start
              const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24))
              return `${diffDays}天`
            },

            // 导出批次员工清单
            exportBatchEmployeeList() {
              this.$message.success('正在导出员工清单...')
            },

            handleExport() {
              this.$message.success('导出功能开发中...')
            },
            handleRefresh() {
              // 重新加载数据，确保数据不会消失
              this.loadSubmissionData()
              this.$message.success('数据已刷新')
            },
            handleViewMaterials(row) {
              this.currentMaterialsRow = row
              this.materialsDialogVisible = true
            },
            handleUrge(row) {
              this.urgeForm.target = row.name
              this.urgeForm.content = '请尽快提交员工行为排查资料，截止时间为2025年1月25日。'
              this.urgeDialogVisible = true
            },
            handleViewUrgeHistory(row) {
              this.currentUrgeHistoryRow = row
              this.urgeHistoryDialogVisible = true
            },

            // 预审相关方法
            handlePreReview(row) {
              this.currentPreReviewEmployee = row
              // 重置审核表单
              this.reviewForm = {
                creditReport: '',
                creditReportComment: '',
                criminalRecord: '',
                criminalRecordComment: '',
                businessStatus: '',
                businessStatusComment: '',
                insuranceStatus: '',
                insuranceStatusComment: '',
                courtStatus: '',
                courtStatusComment: '',
                supplementary: '',
                supplementaryComment: '',
              }
              this.preReviewDialogVisible = true
            },

            viewDocument(type) {
              this.$message.info(`查看${type}文件功能开发中...`)
            },

            submitPreReview() {
              // 模拟提交预审结果
              this.currentPreReviewEmployee.status = '分析中'
              this.$message.success('预审通过，员工资料已提交')

              this.preReviewDialogVisible = false
              this.loadSubmissionData()
            },
            handleUrgeSubmit() {
              if (!this.urgeForm.reason.trim()) {
                this.$message.error('请填写催办原因')
                return
              }
              this.$confirm('确认发送催办通知？', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning',
              })
                .then(() => {
                  this.urgeDialogVisible = false
                  this.$message.success('催办通知发送成功')
                  // 更新催办次数
                  if (this.urgeForm.target.includes('批量')) {
                    this.selectedEmployees.forEach((emp) => {
                      emp.urgeCount++
                      emp.lastUrgeTime = new Date().toLocaleString()
                    })
                  } else {
                    const targetEmployee = this.submissionTableData.find(
                      (emp) => emp.name === this.urgeForm.target
                    )
                    if (targetEmployee) {
                      targetEmployee.urgeCount++
                      targetEmployee.lastUrgeTime = new Date().toLocaleString()
                    }
                  }
                })
                .catch(() => {
                  this.$message.info('已取消催办')
                })
            },
            previewFile(fileType) {
              this.$message.info(`预览${fileType}文件功能开发中...`)
            },
            downloadFile(fileType) {
              this.$message.success(`下载${fileType}文件功能开发中...`)
            },
            handleSubmissionSizeChange(val) {
              this.submissionPagination.pageSize = val
              this.loadSubmissionData()
            },
            handleSubmissionCurrentChange(val) {
              this.submissionPagination.currentPage = val
              this.loadSubmissionData()
            },
            loadSubmissionData() {
              // 直接使用静态数据，确保状态正确
              // 先设置数据，确保数据立即可见
              this.submissionTableData = [
                {
                  index: 1,
                  name: '王**',
                  employeeId: '20080846050',
                  organization: '苏州市分行',
                  department: '相城区支行',
                  batch: '南京市分行2025年第一批次',
                  status: '已完成',
                  submitTime: '2025-01-15 09:30:25',
                  warningLevel: '三级预警',
                  criminalRecord: '有',
                  insuranceIntermediary: '无',
                  enforcementInfo: '无',
                  businessOperation: '无',
                  fraudCriminal: '无',
                  fraudBusiness: '无',
                  lastUrgeTime: '-',
                  urgeCount: 0,
                  creditReport: {
                    fileName: '王**个人信用报告.pdf',
                    fileSize: '2.3MB',
                    uploadTime: '2025-01-15 09:25:30',
                  },
                  noCrimeCertificate: {
                    fileName: '王**无犯罪记录证明.pdf',
                    fileSize: '1.8MB',
                    uploadTime: '2025-01-15 09:28:15',
                  },
                  businessStatusScreenshot: {
                    fileName: '王**经商办企业情况截图.png',
                    fileSize: '1.2MB',
                    uploadTime: '2025-01-15 09:30:00',
                  },
                  supplementaryMaterials: [],
                },
                {
                  index: 2,
                  name: '李**',
                  employeeId: '20080846051',
                  organization: '苏州市分行',
                  department: '办公室',
                  batch: '南京市分行2025年第一批次',
                  status: '分析中',
                  submitTime: '2025-01-16 10:15:30',
                  warningLevel: '二级预警',
                  criminalRecord: '无',
                  insuranceIntermediary: '有',
                  enforcementInfo: '无',
                  businessOperation: '无',
                  fraudCriminal: '无',
                  fraudBusiness: '无',
                  lastUrgeTime: '-',
                  urgeCount: 0,
                  creditReport: {
                    fileName: '李**个人信用报告.pdf',
                    fileSize: '2.1MB',
                    uploadTime: '2025-01-16 10:10:20',
                  },
                  noCrimeCertificate: {
                    fileName: '李**无犯罪记录证明.pdf',
                    fileSize: '1.9MB',
                    uploadTime: '2025-01-16 10:12:45',
                  },
                  businessStatusScreenshot: null,
                  supplementaryMaterials: [],
                },
                {
                  index: 3,
                  name: '张**',
                  employeeId: '20080846052',
                  organization: '苏州市分行',
                  department: '公司金融部',
                  batch: '南京市分行2025年第一批次',
                  status: '未上报',
                  submitTime: '-',
                  warningLevel: '一级预警',
                  criminalRecord: '有',
                  insuranceIntermediary: '无',
                  enforcementInfo: '有',
                  businessOperation: '有',
                  fraudCriminal: '有',
                  fraudBusiness: '有',
                  lastUrgeTime: '2025-01-20 14:30:00',
                  urgeCount: 2,
                  creditReport: null,
                  noCrimeCertificate: null,
                  businessStatusScreenshot: null,
                  supplementaryMaterials: [],
                },
                {
                  index: 4,
                  name: '赵**',
                  employeeId: '20080846053',
                  organization: '苏州市分行',
                  department: '个人金融部',
                  batch: '南京市分行2025年第一批次',
                  status: '待预审',
                  submitTime: '2025-01-18 11:45:15',
                  warningLevel: '一级预警',
                  criminalRecord: '无',
                  insuranceIntermediary: '无',
                  enforcementInfo: '无',
                  businessOperation: '无',
                  fraudCriminal: '无',
                  fraudBusiness: '无',
                  lastUrgeTime: '-',
                  urgeCount: 0,
                  creditReport: {
                    fileName: '赵**个人信用报告.pdf',
                    fileSize: '2.5MB',
                    uploadTime: '2025-01-18 11:40:30',
                  },
                  noCrimeCertificate: {
                    fileName: '赵**无犯罪记录证明.pdf',
                    fileSize: '1.7MB',
                    uploadTime: '2025-01-18 11:42:15',
                  },
                  businessStatusScreenshot: {
                    fileName: '赵**经商办企业情况截图.png',
                    fileSize: '1.4MB',
                    uploadTime: '2025-01-18 11:44:00',
                  },
                  supplementaryMaterials: [],
                },
                {
                  index: 5,
                  name: '孙**',
                  employeeId: '20080846054',
                  organization: '苏州市分行',
                  department: '风险管理部',
                  batch: '南京市分行2025年第一批次',
                  status: '未上报',
                  submitTime: '-',
                  warningLevel: '一级预警',
                  criminalRecord: '无',
                  insuranceIntermediary: '无',
                  enforcementInfo: '无',
                  businessOperation: '无',
                  fraudCriminal: '无',
                  fraudBusiness: '无',
                  lastUrgeTime: '2025-01-19 16:20:00',
                  urgeCount: 1,
                  creditReport: null,
                  noCrimeCertificate: null,
                  businessStatusScreenshot: null,
                  supplementaryMaterials: [],
                },
                {
                  index: 6,
                  name: '陈**',
                  employeeId: '20080846055',
                  organization: '南京市分行',
                  department: '信贷管理部',
                  batch: '南京市分行2025年第一批次',
                  status: '分析中',
                  submitTime: '2025-01-20 14:20:10',
                  warningLevel: '必要关注',
                  criminalRecord: '无',
                  insuranceIntermediary: '无',
                  enforcementInfo: '无',
                  businessOperation: '有',
                  fraudCriminal: '无',
                  fraudBusiness: '无',
                  lastUrgeTime: '-',
                  urgeCount: 0,
                  creditReport: {
                    fileName: '陈**个人信用报告.pdf',
                    fileSize: '1.4MB',
                    uploadTime: '2025-01-20 14:20:10',
                  },
                  noCrimeCertificate: {
                    fileName: '陈**无犯罪记录证明.pdf',
                    fileSize: '890KB',
                    uploadTime: '2025-01-20 14:25:30',
                  },
                  businessStatusScreenshot: {
                    fileName: '陈**经商办企业情况截图.png',
                    fileSize: '1.8MB',
                    uploadTime: '2025-01-20 14:30:45',
                  },
                  supplementaryMaterials: [],
                },
              ]

              // 设置 loading 状态，模拟数据加载过程
              this.submissionLoading = true
              // 短暂延迟后关闭 loading，确保数据已经显示
              setTimeout(() => {
                this.submissionLoading = false
              }, 300)
            },

            // 初始化模拟数据
            initMockData() {
              const batchList = ['南京市分行2025年第一批次', '江苏省分行2024年第四批次']
              const orgList = ['南京市分行', '苏州市分行', '无锡市分行', '常州市分行']
              const deptList = ['风险管理部', '个人金融部', '公司业务部', '信贷管理部']
              const nameList = [
                '王**',
                '李**',
                '张**',
                '刘**',
                '陈**',
                '杨**',
                '赵**',
                '黄**',
                '周**',
                '吴**',
              ]

              const data = []
              for (let i = 1; i <= 50; i++) {
                const warningLevel = Math.floor(Math.random() * 5) // 0-4 (包含必要关注等级1)
                const rowData = {
                  序号: i,
                  姓名: nameList[Math.floor(Math.random() * nameList.length)],
                  批次: batchList[Math.floor(Math.random() * batchList.length)],
                  查询日期: `2025-0${Math.floor(Math.random() * 3) + 1}-${
                    10 + Math.floor(Math.random() * 18)
                  }`,
                  工号: `1000${1000 + i}`,
                  所属机构: orgList[Math.floor(Math.random() * orgList.length)],
                  所属部门: deptList[Math.floor(Math.random() * deptList.length)],
                  征信分数: 60 + Math.floor(Math.random() * 40),
                  预警等级: warningLevel,
                  上一期征信分数: 65 + Math.floor(Math.random() * 35),

                  // 账户数情况
                  总账户数_购房贷款: Math.floor(Math.random() * 3),
                  总账户数_其他贷款: Math.floor(Math.random() * 5),
                  总账户数_其他业务: Math.floor(Math.random() * 3),
                  未结清_信用卡: 3 + Math.floor(Math.random() * 6),
                  未结清_购房贷款: Math.floor(Math.random() * 2),
                  未结清_其他贷款: Math.floor(Math.random() * 3),
                  未结清_其他业务: Math.floor(Math.random() * 2),
                  逾期_信用卡: Math.floor(Math.random() * 3),
                  逾期_购房贷款: Math.floor(Math.random() * 2),
                  逾期_其他贷款: Math.floor(Math.random() * 2),
                  逾期_其他业务: Math.floor(Math.random() * 2),
                  逾期90天_信用卡: warningLevel >= 1 ? Math.floor(Math.random() * 2) : 0,
                  逾期90天_购房贷款: warningLevel >= 2 ? Math.floor(Math.random() * 2) : 0,
                  逾期90天_其他贷款: warningLevel >= 1 ? Math.floor(Math.random() * 2) : 0,
                  逾期90天_其他业务: 0,

                  // 信用卡情况
                  信用卡_信用额度: 30000 + Math.floor(Math.random() * 170000),
                  信用卡_已使用额度: 10000 + Math.floor(Math.random() * 90000),
                  信用卡_分期余额: Math.floor(Math.random() * 50000),
                  逾期贷记卡_信用额度:
                    warningLevel >= 1 ? 20000 + Math.floor(Math.random() * 80000) : 0,
                  逾期贷记卡_余额: warningLevel >= 1 ? 5000 + Math.floor(Math.random() * 30000) : 0,
                  逾期贷记卡_90天: warningLevel >= 2 ? '有' : '无',
                  正常贷记卡_信用额度: 50000 + Math.floor(Math.random() * 150000),
                  正常贷记卡_已使用额度: 15000 + Math.floor(Math.random() * 85000),

                  // 贷款情况
                  贷款_发放额度: 100000 + Math.floor(Math.random() * 1900000),
                  贷款_余额: 50000 + Math.floor(Math.random() * 1450000),
                  贷款_房贷发放额度: 500000 + Math.floor(Math.random() * 1500000),
                  贷款_房贷余额: 300000 + Math.floor(Math.random() * 1200000),
                  贷款_经营贷余额: Math.floor(Math.random() * 500000),
                  逾期贷款_发放额度:
                    warningLevel >= 1 ? 50000 + Math.floor(Math.random() * 450000) : 0,
                  逾期贷款_余额: warningLevel >= 1 ? 30000 + Math.floor(Math.random() * 270000) : 0,
                  逾期贷款_90天: warningLevel >= 2 ? '有' : '无',
                  正常贷款_发放额度: 200000 + Math.floor(Math.random() * 800000),
                  正常贷款_余额: 100000 + Math.floor(Math.random() * 400000),

                  // 相关还款责任信息
                  还款责任_个人: Math.floor(Math.random() * 3),
                  还款责任_企业: Math.floor(Math.random() * 2),
                  还款责任_担保余额: Math.floor(Math.random() * 300000),

                  // 记录信息
                  非信贷交易记录: Math.floor(Math.random() * 5),
                  公共记录: Math.floor(Math.random() * 2),

                  // 查询记录
                  查询_机构个数: 5 + Math.floor(Math.random() * 10),
                  查询_贷款审批:
                    warningLevel >= 2
                      ? 5 + Math.floor(Math.random() * 10)
                      : Math.floor(Math.random() * 5),
                  查询_信用卡审批:
                    warningLevel >= 1
                      ? 3 + Math.floor(Math.random() * 7)
                      : Math.floor(Math.random() * 3),
                  查询_贷后管理: 10 + Math.floor(Math.random() * 20),
                  查询_保前审查: Math.floor(Math.random() * 5),
                  查询_个人查询: Math.floor(Math.random() * 3),

                  // 账户对比情况
                  对比_信用卡增加: Math.floor(Math.random() * 3),
                  对比_其他贷款增加: Math.floor(Math.random() * 2),
                  对比_还款责任增加: Math.floor(Math.random() * 2),
                  对比_其他贷款余额增加: Math.floor(Math.random() * 100000),
                  对比_信用卡余额增加: Math.floor(Math.random() * 50000),
                }

                // 为第一条记录添加示例修改记录
                if (i === 1) {
                  rowData._modifyHistory = [
                    {
                      字段名称: '征信分数',
                      原始值: '73',
                      新值: '85',
                      修改原因: '经核实，该员工已结清部分逾期贷款，征信分数需要调整',
                      补充材料: 'https://example.com/credit_update.pdf',
                      修改人: '李四',
                      工号: '10001234',
                      修改时间: '2025-01-10 14:30:25',
                    },
                    {
                      字段名称: '预警等级',
                      原始值: '2',
                      新值: '1',
                      修改原因: '根据最新征信情况，预警等级从二级调整为一级预警',
                      补充材料: null,
                      修改人: '王五',
                      工号: '10001235',
                      修改时间: '2025-01-09 09:15:18',
                    },
                    {
                      字段名称: '信用卡_已使用额度',
                      原始值: '45000',
                      新值: '32000',
                      修改原因: '员工提供了最新的信用卡账单，显示已使用额度有所下降',
                      补充材料: 'https://example.com/credit_card_statement.pdf',
                      修改人: '张三',
                      工号: '10001233',
                      修改时间: '2025-01-08 16:45:32',
                    },
                  ]
                }

                data.push(rowData)
              }

              this.allTableData = data
              this.total = data.length
            },

            // 初始化用户管理数据
            initUserData() {
              const users = [
                {
                  id: 1,
                  name: '张三',
                  jobNumber: '10001001',
                  org: '南京市分行',
                  dept: '风险管理部',
                  role: '综合员',
                  roleCode: 'reviewer',
                  status: '已启用',
                  authTime: '2025-01-05 09:30:25',
                  authBy: '李四（10001234）',
                  lastUseTime: '2025-10-11 08:25:12',
                },
                {
                  id: 2,
                  name: '李四',
                  jobNumber: '10001234',
                  org: '江苏省分行',
                  dept: '人力资源部',
                  role: '人力管理员',
                  roleCode: 'hr_admin',
                  status: '已启用',
                  authTime: '2024-12-01 10:15:00',
                  authBy: '王五（10001235）',
                  lastUseTime: '2025-10-11 09:45:30',
                },
                {
                  id: 3,
                  name: '王五',
                  jobNumber: '10001235',
                  org: '江苏省分行',
                  dept: '人力资源部',
                  role: '人力管理员',
                  roleCode: 'hr_admin',
                  status: '已启用',
                  authTime: '2024-11-15 14:20:00',
                  authBy: '李四（10001234）',
                  lastUseTime: '2025-10-10 16:30:45',
                },
                {
                  id: 4,
                  name: '赵六',
                  jobNumber: '10002001',
                  org: '苏州市分行',
                  dept: '个人金融部',
                  role: '部门负责人',
                  roleCode: 'dept_leader',
                  status: '已启用',
                  authTime: '2025-01-10 11:00:00',
                  authBy: '李四（10001234）',
                  lastUseTime: '2025-10-11 07:15:20',
                },
                {
                  id: 5,
                  name: '孙七',
                  jobNumber: '10002002',
                  org: '苏州市分行',
                  dept: '公司业务部',
                  role: '综合员',
                  roleCode: 'reviewer',
                  status: '已启用',
                  authTime: '2025-01-08 15:30:00',
                  authBy: '李四（10001234）',
                  lastUseTime: '2025-10-10 18:20:33',
                },
                {
                  id: 6,
                  name: '周八',
                  jobNumber: '10003001',
                  org: '无锡市分行',
                  dept: '信贷管理部',
                  role: '部门负责人',
                  roleCode: 'dept_leader',
                  status: '已启用',
                  authTime: '2025-01-12 09:45:00',
                  authBy: '李四（10001234）',
                  lastUseTime: '2025-10-11 10:10:15',
                },
                {
                  id: 7,
                  name: '吴九',
                  jobNumber: '10003002',
                  org: '无锡市分行',
                  dept: '风险管理部',
                  role: '综合员',
                  roleCode: 'reviewer',
                  status: '已启用',
                  authTime: '2025-01-15 16:20:00',
                  authBy: '李四（10001234）',
                  lastUseTime: '2025-10-09 14:35:40',
                },
                {
                  id: 8,
                  name: '郑十',
                  jobNumber: '10004001',
                  org: '常州市分行',
                  dept: '个人金融部',
                  role: '部门负责人',
                  roleCode: 'dept_leader',
                  status: '已禁用',
                  authTime: '2024-12-20 10:30:00',
                  authBy: '李四（10001234）',
                  lastUseTime: '2025-09-30 11:20:00',
                },
                {
                  id: 9,
                  name: '陈一',
                  jobNumber: '10001003',
                  org: '南京市分行',
                  dept: '信贷管理部',
                  role: '综合员',
                  roleCode: 'reviewer',
                  status: '已启用',
                  authTime: '2025-02-01 08:15:00',
                  authBy: '李四（10001234）',
                  lastUseTime: '2025-10-11 09:05:25',
                },
                {
                  id: 10,
                  name: '刘二',
                  jobNumber: '10002003',
                  org: '苏州市分行',
                  dept: '风险管理部',
                  role: '部门负责人',
                  roleCode: 'dept_leader',
                  status: '已启用',
                  authTime: '2025-01-20 13:40:00',
                  authBy: '李四（10001234）',
                  lastUseTime: '2025-10-10 15:50:12',
                },
              ]
              this.userList = users
              this.userTotal = users.length
            },

            // 初始化参数配置数据
            initParamData() {
              // 初始化评分模型参数
              this.scoreParams = [
                {
                  name: '未结清/未销户信用卡账户数',
                  unit: '张',
                  defaultValue: 5,
                  currentValue: 5,
                  min: 0,
                  max: 20,
                  range: '0-20',
                  description: '每个账户扣除的分数',
                  thresholdValue: 10,
                  ruleX: 1,
                  ruleY: 1,
                  warningThreshold: 20,
                },
                {
                  name: '未结清/未销户其他贷款账户数',
                  unit: '张',
                  defaultValue: 8,
                  currentValue: 8,
                  min: 0,
                  max: 20,
                  range: '0-20',
                  description: '每个账户扣除的分数',
                  thresholdValue: 3,
                  ruleX: 1,
                  ruleY: 1,
                  warningThreshold: 5,
                },
                {
                  name: '逾期账户数',
                  unit: '张',
                  defaultValue: 15,
                  currentValue: 15,
                  min: 0,
                  max: 30,
                  range: '0-30',
                  description: '每个账户扣除的分数',
                  thresholdValue: 10,
                  ruleX: 1,
                  ruleY: 1,
                  warningThreshold: 20,
                },
                {
                  name: '90天以上逾期的账户数',
                  unit: '户',
                  defaultValue: 25,
                  currentValue: 25,
                  min: 0,
                  max: 50,
                  range: '0-50',
                  description: '每个账户扣除的分数',
                  thresholdValue: 10,
                  ruleX: 1,
                  ruleY: 1,
                  warningThreshold: 20,
                },
                {
                  name: '相关还款责任账户数',
                  unit: '张',
                  defaultValue: 10,
                  currentValue: 10,
                  min: 0,
                  max: 20,
                  range: '0-20',
                  description: '每个账户扣除的分数',
                  thresholdValue: 6,
                  ruleX: 1,
                  ruleY: 1,
                  warningThreshold: 20,
                },
                {
                  name: '信用卡已使用额度',
                  unit: '户',
                  defaultValue: 2,
                  currentValue: 2,
                  min: 0,
                  max: 10,
                  range: '0-10',
                  description: '每10000元扣除的分数',
                  thresholdValue: 2,
                  ruleX: 1,
                  ruleY: 1,
                  warningThreshold: 5,
                },
                {
                  name: '房贷贷款结余',
                  unit: '户',
                  defaultValue: 3,
                  currentValue: 3,
                  min: 0,
                  max: 10,
                  range: '0-10',
                  description: '每100000元扣除的分数',
                  thresholdValue: 5,
                  ruleX: 1,
                  ruleY: 1,
                  warningThreshold: 10,
                },
                {
                  name: '其他贷款结余',
                  unit: '户',
                  defaultValue: 5,
                  currentValue: 5,
                  min: 0,
                  max: 15,
                  range: '0-15',
                  description: '每10000元扣除的分数',
                  thresholdValue: 3,
                  ruleX: 1,
                  ruleY: 1,
                  warningThreshold: 5,
                },
                {
                  name: '机构查询次数',
                  unit: '户',
                  defaultValue: 3,
                  currentValue: 3,
                  min: 0,
                  max: 10,
                  range: '0-10',
                  description: '每次查询扣除的分数',
                  thresholdValue: 0,
                  ruleX: 1,
                  ruleY: 2,
                  warningThreshold: 5,
                },
                {
                  name: '个人查询次数',
                  unit: '户',
                  defaultValue: 1,
                  currentValue: 1,
                  min: 0,
                  max: 5,
                  range: '0-5',
                  description: '每次查询扣除的分数',
                  thresholdValue: 0,
                  ruleX: 1,
                  ruleY: 2,
                  warningThreshold: 5,
                },
                {
                  name: '公共记录条数',
                  unit: '户',
                  defaultValue: 20,
                  currentValue: 20,
                  min: 0,
                  max: 50,
                  range: '0-50',
                  description: '每条记录扣除的分数',
                  thresholdValue: 0,
                  ruleX: 1,
                  ruleY: 2,
                  warningThreshold: 2,
                },
                {
                  name: '非信贷交易后付费记录数',
                  unit: '张',
                  defaultValue: 5,
                  currentValue: 5,
                  min: 0,
                  max: 15,
                  range: '0-15',
                  description: '每条记录扣除的分数',
                  thresholdValue: 0,
                  ruleX: 1,
                  ruleY: 5,
                  warningThreshold: 3,
                },
                {
                  name: '存在经营性贷款',
                  unit: '户',
                  defaultValue: 3,
                  currentValue: 3,
                  min: 0,
                  max: 10,
                  range: '0-10',
                  description: '每10000元扣除的分数',
                  thresholdValue: 0,
                  ruleX: 1,
                  ruleY: 5,
                  warningThreshold: 3,
                },
                {
                  name: '存在担保性贷款',
                  unit: '户',
                  defaultValue: 4,
                  currentValue: 4,
                  min: 0,
                  max: 10,
                  range: '0-10',
                  description: '每10000元扣除的分数',
                  thresholdValue: 0,
                  ruleX: 1,
                  ruleY: 5,
                  warningThreshold: 3,
                },
                {
                  name: '相较上一期信用卡账户增加数',
                  unit: '户',
                  defaultValue: 3,
                  currentValue: 3,
                  min: 0,
                  max: 10,
                  range: '0-10',
                  description: '每个账户扣除的分数',
                  thresholdValue: 0,
                  ruleX: 1,
                  ruleY: 5,
                  warningThreshold: 3,
                },
                {
                  name: '相较上一期其他贷款账户增加数',
                  unit: '户',
                  defaultValue: 5,
                  currentValue: 5,
                  min: 0,
                  max: 15,
                  range: '0-15',
                  description: '每个账户扣除的分数',
                  thresholdValue: 0,
                  ruleX: 1,
                  ruleY: 5,
                  warningThreshold: 3,
                },
                {
                  name: '相较上一期查询次数增加数',
                  unit: '户',
                  defaultValue: 2,
                  currentValue: 2,
                  min: 0,
                  max: 10,
                  range: '0-10',
                  description: '每次查询扣除的分数',
                  thresholdValue: 0,
                  ruleX: 1,
                  ruleY: 5,
                  warningThreshold: 3,
                },
              ]

              // 初始化预警阈值配置
              this.warningThresholds = [
                {
                  name: '必要关注预警分数阈值',
                  unit: '分',
                  currentValue: 50,
                  min: 0,
                  max: 100,
                  description: '高于此分数触发必要关注预警',
                },
                {
                  name: '一级预警分数阈值',
                  unit: '分',
                  currentValue: 60,
                  min: 0,
                  max: 100,
                  description: '高于此分数触发一级预警',
                },
                {
                  name: '二级预警分数阈值',
                  unit: '分',
                  currentValue: 75,
                  min: 0,
                  max: 100,
                  description: '高于此分数触发二级预警',
                },
                {
                  name: '三级预警分数阈值',
                  unit: '分',
                  currentValue: 85,
                  min: 0,
                  max: 100,
                  description: '高于此分数触发三级预警',
                },
              ]

              // 初始化参数变更历史
              this.paramHistoryList = [
                {
                  changeTime: '2025-09-15 14:30:00',
                  changeBy: '李四（10001234）',
                  changeType: '评分模型参数',
                  changeContent: '未结清/未销户信用卡账户数：10 → 5',
                  changeReason: '根据实际业务情况，调整信用卡账户数的扣分标准，降低对员工的影响',
                  effectTime: '2025-09-16 00:00:00',
                },
                {
                  changeTime: '2025-08-20 10:15:00',
                  changeBy: '王五（10001235）',
                  changeType: '预警规则配置',
                  changeContent: '一级预警分数阈值：50 → 60',
                  changeReason:
                    '根据上季度数据分析，提高一级预警阈值，减少误报率，提高预警的准确性',
                  effectTime: '2025-08-21 00:00:00',
                },
                {
                  changeTime: '2025-07-10 16:45:00',
                  changeBy: '李四（10001234）',
                  changeType: '预警规则配置',
                  changeContent: '逾期账户数红线：3 → 2',
                  changeReason: '严格风控标准，降低逾期账户数红线，加强对员工行为的管控力度',
                  effectTime: '2025-07-11 00:00:00',
                },
              ]
            },

            // 加载表格数据
            loadTableData() {
              const start = (this.currentPage - 1) * this.pageSize
              const end = start + this.pageSize
              this.tableData = this.allTableData.slice(start, end)
            },

            // 菜单选择
            handleMenuSelect(index) {
              this.activeMenu = index

              // 使用 $nextTick 确保 DOM 更新后再处理数据
              this.$nextTick(() => {
                // 根据菜单切换重新加载对应数据
                if (index === 'employee-submission') {
                  // 强制重新渲染页面
                  this.submissionPageKey++
                  // 确保完全重置台账明细管理页面
                  this.resetSubmissionPage()
                  this.loadSubmissionData()
                } else if (index === 'ledger-management') {
                  this.loadTableData()
                } else if (index === 'user-management') {
                  this.initUserData()
                } else if (index === 'param-config') {
                  this.initParamData()
                } else if (index === 'batch-management') {
                  // 排查批次管理页面 - 简单重置状态
                  this.batchLoading = false
                }
              })
            },

            // 重置台账明细管理页面
            resetSubmissionPage() {
              // 重置所有相关数据
              this.submissionFilterForm = {
                batch: ['2025Q1'],
                organization: [],
                department: '',
                status: '',
                name: '',
                employeeId: '',
              }
              this.submissionPagination = {
                currentPage: 1,
                pageSize: 10,
                total: 5,
              }
              this.selectedEmployees = []
              this.materialsDialogVisible = false
              this.urgeDialogVisible = false
              this.urgeHistoryDialogVisible = false
              this.currentMaterialsRow = null
              this.currentUrgeHistoryRow = null
              // 注意：不要在这里设置 submissionLoading = false，让 loadSubmissionData() 来管理
              // 也不要清空 submissionTableData，保持数据可见
            },

            // 获取页面标题
            getPageTitle() {
              const titles = {
                'user-management': '用户管理',
                'param-config': '参数配置',
                'ledger-management': '台账明细管理',
              }
              return titles[this.activeMenu] || '页面'
            },

            // 退出登录
            handleLogout() {
              this.$confirm('确定要退出登录吗?', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning',
              })
                .then(() => {
                  this.$message.success('退出成功')
                })
                .catch(() => {})
            },

            // 筛选查询
            handleQuery() {
              let filteredData = [...this.allTableData]

              // 批次筛选
              if (this.filterForm.batch && this.filterForm.batch.length > 0) {
                filteredData = filteredData.filter((item) =>
                  this.filterForm.batch.includes(item.批次)
                )
              }

              // 日期范围筛选
              if (this.filterForm.dateRange && this.filterForm.dateRange.length === 2) {
                const [startDate, endDate] = this.filterForm.dateRange
                filteredData = filteredData.filter(
                  (item) => item.查询日期 >= startDate && item.查询日期 <= endDate
                )
              }

              // 机构筛选
              if (this.filterForm.organization && this.filterForm.organization.length > 0) {
                const orgValue = this.filterForm.organization[0] // 取第一个元素（选中的节点value）
                // 根据选中的节点value，筛选匹配的机构数据
                filteredData = filteredData.filter((item) => {
                  const itemOrg = item.所属机构
                  // 如果选中的是省或市，需要匹配包含该机构的所有数据
                  // 如果选中的是一支或二支，需要精确匹配
                  return itemOrg.includes(orgValue) || orgValue.includes(itemOrg)
                })
              }

              // 部门筛选
              if (this.filterForm.department) {
                filteredData = filteredData.filter(
                  (item) => item.所属部门 === this.filterForm.department
                )
              }

              // 预警等级筛选
              if (this.filterForm.warningLevel !== '') {
                filteredData = filteredData.filter(
                  (item) => item.预警等级 === parseInt(this.filterForm.warningLevel)
                )
              }

              // 姓名/工号搜索
              if (this.filterForm.keyword) {
                const keyword = this.filterForm.keyword.toLowerCase()
                filteredData = filteredData.filter(
                  (item) =>
                    item.姓名.toLowerCase().includes(keyword) ||
                    item.工号.toLowerCase().includes(keyword)
                )
              }

              this.allTableData = filteredData
              this.total = filteredData.length
              this.currentPage = 1
              this.loadTableData()

              this.$message.success(`筛选完成，共找到 ${this.total} 条记录`)
            },

            // 重置筛选
            handleReset() {
              // 清空树选择
              if (this.$refs.ledgerOrgTree) {
                this.$refs.ledgerOrgTree.setCurrentKey(null)
              }
              this.filterForm = {
                yearBatch: [],
                batch: [],
                dateRange: [],
                organization: [],
                selectedOrgPath: '',
                currentOrgKey: null,
                department: '',
                isBranchSelected: false,
                warningLevel: [],
                verified: '',
                name: '',
                employeeId: '',
              }
              this.initMockData()
              this.loadTableData()
              this.$message.info('筛选条件已重置')
            },

            // 刷新数据
            handleRefresh() {
              this.loadTableData()
              this.$message.success('数据已刷新')
            },

            // 导出数据
            handleExport() {
              if (this.selectedRows.length > 0) {
                this.$confirm(`确定要导出选中的 ${this.selectedRows.length} 条数据吗?`, '提示', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                })
                  .then(() => {
                    this.$message.success('导出成功')
                  })
                  .catch(() => {})
              } else {
                this.$confirm(`确定要导出全部 ${this.total} 条数据吗?`, '提示', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                })
                  .then(() => {
                    this.$message.success('导出成功')
                  })
                  .catch(() => {})
              }
            },

            // 表格选择
            handleSelectionChange(val) {
              this.selectedRows = val
            },

            // 分页
            handleSizeChange(val) {
              this.pageSize = val
              this.loadTableData()
            },
            handleCurrentChange(val) {
              this.currentPage = val
              this.loadTableData()
            },

            // 获取预警等级样式
            getWarningClass(level) {
              const classes = {
                0: 'normal',
                1: 'necessary-attention',
                2: 'level-1',
                3: 'level-2',
                4: 'level-3',
              }
              return classes[level] || 'normal'
            },

            // 获取预警等级文本
            getWarningText(level) {
              const texts = {
                0: '正常',
                1: '必要关注',
                2: '一级预警',
                3: '二级预警',
                4: '三级预警',
              }
              return texts[level] || '正常'
            },

            // 获取核实状态
            getVerificationStatus(level) {
              // 预警等级为正常(0)时显示"已核实"，其他等级显示"未核实"
              return level === 0 ? '已核实' : '未核实'
            },

            // 获取核实状态样式类
            getVerificationStatusClass(level) {
              return level === 0 ? 'verified-status' : 'unverified-status'
            },

            // 编辑数据
            handleEdit(row, fieldName) {
              let oldValue = ''
              let newValue = ''

              if (fieldName === '预警等级') {
                oldValue = this.getWarningText(row[fieldName])
                newValue = String(row[fieldName])
              } else if (fieldName === '核实状态') {
                oldValue = this.getVerificationStatus(row.预警等级)
                newValue = this.getVerificationStatus(row.预警等级)
              } else {
                oldValue = String(row[fieldName])
                newValue = ''
              }

              this.editForm = {
                fieldName: fieldName,
                oldValue: oldValue,
                newValue: newValue,
                reason: '',
                fileList: [],
                rowData: row,
              }
              this.editDialogVisible = true
            },

            // 关闭编辑弹窗
            handleEditDialogClose() {
              this.$refs.editForm.resetFields()
            },

            // 提交编辑
            handleEditSubmit() {
              this.$refs.editForm.validate((valid) => {
                if (valid) {
                  this.$confirm('确定要修改该数据吗?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning',
                  })
                    .then(() => {
                      // 更新数据
                      if (this.editForm.fieldName === '核实状态') {
                        // 核实状态字段不直接存储，而是根据预警等级计算
                        // 这里可以添加额外的逻辑来处理核实状态
                        console.log('核实状态修改:', this.editForm.newValue)
                      } else {
                        this.editForm.rowData[this.editForm.fieldName] = this.editForm.newValue
                      }

                      // 记录修改历史
                      const historyRecord = {
                        字段名称: this.editForm.fieldName,
                        原始值: this.editForm.oldValue,
                        新值: this.editForm.newValue,
                        修改原因: this.editForm.reason,
                        补充材料: this.editForm.fileList.length > 0 ? '已上传' : null,
                        修改人: '李四',
                        工号: '10001234',
                        修改时间: new Date().toLocaleString('zh-CN', {
                          year: 'numeric',
                          month: '2-digit',
                          day: '2-digit',
                          hour: '2-digit',
                          minute: '2-digit',
                          second: '2-digit',
                        }),
                      }

                      // 保存到行数据的修改记录中
                      if (!this.editForm.rowData._modifyHistory) {
                        this.editForm.rowData._modifyHistory = []
                      }
                      this.editForm.rowData._modifyHistory.unshift(historyRecord)

                      this.$message.success('修改成功')
                      this.editDialogVisible = false
                      this.loadTableData()
                    })
                    .catch(() => {})
                }
              })
            },

            // 文件上传处理
            handlePreview(file) {
              console.log('预览文件:', file)
            },
            handleRemove(file, fileList) {
              console.log('删除文件:', file)
              this.editForm.fileList = fileList
            },

            // 查看详情
            handleViewDetail(row) {
              this.currentDetailRow = row
              this.detailDialogVisible = true
            },

            // 查看修改记录
            handleViewHistory(row) {
              this.historyList = row._modifyHistory || []
              this.historyDialogVisible = true
            },

            // 批量修改
            handleBatchEdit(row) {
              this.$confirm('确定要对该员工进行批量修改吗？', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning',
              })
                .then(() => {
                  // 这里可以打开批量修改弹窗
                  this.$message.success('批量修改功能开发中')
                })
                .catch(() => {})
            },

            // ================ 用户管理相关方法 ================

            // 添加授权用户
            handleAddUser() {
              this.addUserDialogVisible = true
            },

            // 修改用户角色
            handleEditUserRole(row) {
              this.editRoleForm = {
                userId: row.id,
                name: row.name,
                jobNumber: row.jobNumber,
                oldRole: row.role,
                newRole: '',
                reason: '',
              }
              this.editRoleDialogVisible = true
            },

            // 启用/禁用用户
            handleToggleUserStatus(row) {
              const action = row.status === '已启用' ? '禁用' : '启用'
              this.$confirm(`确定要${action}该用户吗？`, '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning',
              })
                .then(() => {
                  row.status = row.status === '已启用' ? '已禁用' : '已启用'
                  this.$message.success(`${action}成功`)
                })
                .catch(() => {})
            },

            // 移除授权
            handleRemoveAuth(row) {
              this.$confirm('移除授权后，该用户将恢复为普通员工角色，确定要移除吗？', '警告', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning',
              })
                .then(() => {
                  const index = this.userList.findIndex((u) => u.id === row.id)
                  if (index > -1) {
                    this.userList.splice(index, 1)
                    this.userTotal = this.userList.length
                  }
                  this.$message.success('移除授权成功')
                })
                .catch(() => {})
            },

            // 用户查询
            handleUserSearch() {
              this.$message.success('查询功能开发中')
            },

            // 重置用户筛选
            handleUserReset() {
              this.userFilterForm = {
                org: [],
                dept: '',
                role: '',
                status: '',
                keyword: '',
              }
              this.$message.info('筛选条件已重置')
            },

            // 用户分页
            handleUserSizeChange(val) {
              this.userPageSize = val
            },
            handleUserCurrentChange(val) {
              this.userCurrentPage = val
            },

            // 获取角色类型
            getRoleType(roleCode) {
              const types = {
                reviewer: 'success',
                dept_leader: 'warning',
                hr_admin: 'danger',
              }
              return types[roleCode] || ''
            },

            // 配置权限
            handleConfigPermission(role) {
              this.currentRole = role
            },

            // 保存权限配置
            handleSavePermission() {
              const checkedKeys = this.$refs.permissionTree.getCheckedKeys()
              this.$confirm('确定要保存权限配置吗？', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning',
              })
                .then(() => {
                  this.currentRole.permissions = checkedKeys
                  this.$message.success('权限配置保存成功')
                  this.currentRole = null
                })
                .catch(() => {})
            },

            // ================ 参数配置相关方法 ================

            // 保存评分模型参数
            handleSaveParams() {
              this.$prompt('请输入参数变更原因', '参数变更确认', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                inputType: 'textarea',
                inputValidator: (value) => {
                  if (!value) {
                    return '请输入变更原因'
                  }
                  return true
                },
              })
                .then(({ value }) => {
                  this.$message.success('参数配置保存成功')
                  // 记录变更历史
                  this.paramHistoryList.unshift({
                    changeTime: new Date().toLocaleString('zh-CN'),
                    changeBy: '李四（10001234）',
                    changeType: '评分模型参数',
                    changeContent: '多个参数已更新',
                    changeReason: value,
                    effectTime: new Date().toLocaleString('zh-CN'),
                  })
                })
                .catch(() => {})
            },

            // 恢复默认参数
            handleRestoreDefault() {
              this.$confirm('确定要恢复为默认参数吗？此操作将覆盖当前配置。', '警告', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning',
              })
                .then(() => {
                  this.scoreParams.forEach((item) => {
                    item.currentValue = item.defaultValue
                  })
                  this.$message.success('已恢复为默认参数')
                })
                .catch(() => {})
            },

            // 打开测算工具
            handleOpenCalculator() {
              this.calculatorDialogVisible = true
            },

            // 查看参数变更历史
            handleViewParamHistory() {
              this.paramHistoryDialogVisible = true
            },

            // 保存预警规则
            handleSaveWarningRules() {
              this.$prompt('请输入参数变更原因', '参数变更确认', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                inputType: 'textarea',
                inputValidator: (value) => {
                  if (!value) {
                    return '请输入变更原因'
                  }
                  return true
                },
              })
                .then(({ value }) => {
                  // 验证阈值递增关系
                  const level1 = this.warningLevelRules[0].currentValue
                  const level2 = this.warningLevelRules[1].currentValue
                  const level3 = this.warningLevelRules[2].currentValue

                  if (level1 >= level2 || level2 >= level3) {
                    this.$message.error('预警等级阈值需要保持递增关系：一级 < 二级 < 三级')
                    return
                  }

                  this.$message.success('预警规则配置保存成功')
                  // 记录变更历史
                  this.paramHistoryList.unshift({
                    changeTime: new Date().toLocaleString('zh-CN'),
                    changeBy: '李四（10001234）',
                    changeType: '预警规则配置',
                    changeContent: '多个预警规则已更新',
                    changeReason: value,
                    effectTime: new Date().toLocaleString('zh-CN'),
                  })
                })
                .catch(() => {})
            },

            // 恢复预警默认规则
            handleRestoreWarningDefault() {
              this.$confirm('确定要恢复为默认预警规则吗？此操作将覆盖当前配置。', '警告', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning',
              })
                .then(() => {
                  this.warningLevelRules.forEach((item) => {
                    item.currentValue = item.defaultValue
                  })
                  this.warningThresholds.forEach((item) => {
                    item.currentValue = item.defaultValue
                  })
                  this.$message.success('已恢复为默认预警规则')
                })
                .catch(() => {})
            },

            // 获取预警等级类型
            getWarningLevelType(level) {
              const types = {
                正常: 'success',
                必要关注: 'success',
                一级预警: 'danger',
                二级预警: 'warning',
                三级预警: 'info',
              }
              return types[level] || ''
            },

            // 确认添加用户
            handleConfirmAddUser() {
              if (!this.addUserForm.role) {
                this.$message.warning('请选择授权角色')
                return
              }
              this.$message.success('添加授权用户成功')
              this.addUserDialogVisible = false
              // 重新加载用户列表
              this.initUserData()
            },

            // 确认修改角色
            handleConfirmEditRole() {
              if (!this.editRoleForm.newRole || this.editRoleForm.newRole.length === 0) {
                this.$message.warning('请选择新角色')
                return
              }
              if (!this.editRoleForm.reason) {
                this.$message.warning('请输入变更原因')
                return
              }
              this.$message.success('角色修改成功')
              this.editRoleDialogVisible = false
              // 重新加载用户列表
              this.initUserData()
            },

            // 计算得分
            handleCalculate() {
              const testData = this.calculatorForm.testData
              let totalDeduct = 0
              const details = []

              // 计算每项扣分
              if (testData.creditCards > 0) {
                const deduct = testData.creditCards * this.scoreParams[0].currentValue
                totalDeduct += deduct
                details.push({
                  item: '未结清/未销户信用卡账户数',
                  value: testData.creditCards,
                  score: this.scoreParams[0].currentValue,
                  deduct: deduct,
                })
              }

              if (testData.otherLoans > 0) {
                const deduct = testData.otherLoans * this.scoreParams[1].currentValue
                totalDeduct += deduct
                details.push({
                  item: '未结清/未销户其他贷款账户数',
                  value: testData.otherLoans,
                  score: this.scoreParams[1].currentValue,
                  deduct: deduct,
                })
              }

              if (testData.overdueAccounts > 0) {
                const deduct = testData.overdueAccounts * this.scoreParams[2].currentValue
                totalDeduct += deduct
                details.push({
                  item: '逾期账户数',
                  value: testData.overdueAccounts,
                  score: this.scoreParams[2].currentValue,
                  deduct: deduct,
                })
              }

              if (testData.overdue90 > 0) {
                const deduct = testData.overdue90 * this.scoreParams[3].currentValue
                totalDeduct += deduct
                details.push({
                  item: '90天以上逾期的账户数',
                  value: testData.overdue90,
                  score: this.scoreParams[3].currentValue,
                  deduct: deduct,
                })
              }

              if (testData.creditUsed > 0) {
                const units = Math.floor(testData.creditUsed / 10000)
                const deduct = units * this.scoreParams[5].currentValue
                totalDeduct += deduct
                details.push({
                  item: '信用卡已使用额度',
                  value: testData.creditUsed + '元',
                  score: this.scoreParams[5].currentValue + '/万元',
                  deduct: deduct,
                })
              }

              if (testData.queries > 0) {
                const deduct = testData.queries * this.scoreParams[8].currentValue
                totalDeduct += deduct
                details.push({
                  item: '机构查询次数',
                  value: testData.queries,
                  score: this.scoreParams[8].currentValue,
                  deduct: deduct,
                })
              }

              // 计算最终得分
              const finalScore = Math.max(0, Math.min(100, 100 - totalDeduct))

              // 判断预警等级
              let level = '正常'
              let levelType = 'success'
              if (finalScore < this.warningLevelRules[0].currentValue) {
                level = '一级预警'
                levelType = 'danger'
              } else if (finalScore < this.warningLevelRules[1].currentValue) {
                level = '二级预警'
                levelType = 'warning'
              } else if (finalScore < this.warningLevelRules[2].currentValue) {
                level = '三级预警'
                levelType = ''
              }

              this.calculatorForm.result = {
                score: finalScore,
                level: level,
                levelType: levelType,
                details: details,
              }
            },

            // 查看参数详情
            handleViewParamDetail(row) {
              this.$alert(
                `<div style="line-height: 1.8">
                <p><strong>变更内容：</strong>${row.changeContent}</p>
                <p><strong>变更原因：</strong>${row.changeReason}</p>
                <p><strong>变更人：</strong>${row.changeBy}</p>
                <p><strong>生效时间：</strong>${row.effectTime}</p>
              </div>`,
                '参数变更详情',
                {
                  dangerouslyUseHTMLString: true,
                  confirmButtonText: '关闭',
                }
              )
            },

            // 排查汇总统计页面相关方法
            handleOrgStatisticsQuery() {
              this.$message.success('查询完成')
            },
            handleOrgStatisticsReset() {
              this.orgStatisticsFilterForm = {
                year: '',
                initiatingOrg: [],
                batch: [],
                granularity: '',
                organization: [],
                department: [],
                warningIndicator: [],
              }
              this.$message.info('筛选条件已重置')
            },
            handleOrgStatisticsExport() {
              this.$confirm('确定要导出排查汇总统计数据吗？', '导出确认', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning',
              }).then(() => {
                this.$message.success('导出成功')
              })
            },
            handleOrgStatisticsRefresh() {
              this.$message.success('数据已刷新')
            },
            handleOrgStatisticsSizeChange(val) {
              this.orgStatisticsPagination.pageSize = val
              this.$message.info(`每页显示 ${val} 条`)
            },
            handleOrgStatisticsCurrentChange(val) {
              this.orgStatisticsPagination.currentPage = val
              this.$message.info(`当前页: ${val}`)
            },

            // 统计看板相关方法
            handleDashboardReset() {
              // 清空树选择
              if (this.$refs.orgTree) {
                this.$refs.orgTree.setCurrentKey(null)
              }
              this.dashboardFilterForm = {
                initiatingOrg: '',
                batch: '',
                organization: [],
                selectedOrgPath: '',
                currentOrgKey: null,
                department: '',
                isBranchSelected: false,
              }
              this.$message.info('筛选条件已重置')
            },
            handleDashboardQuery() {
              // 模拟查询数据
              // 更新基本情况数据
              if (this.dashboardFilterForm.selectedOrgPath) {
                this.dashboardData.basicInfo.organization = this.dashboardFilterForm.selectedOrgPath
              }
              this.$message.success('查询成功')
              // 这里可以根据筛选条件更新dashboardData
            },
            // 处理机构树节点点击（统计看板）- 临时选择
            handleOrgTreeNodeClick(data, node) {
              // 构建路径（从根到当前节点）
              const path = []
              let currentNode = node
              while (currentNode && currentNode.data) {
                path.unshift(currentNode.data.label)
                currentNode = currentNode.parent
              }

              // 临时保存选中的机构和路径
              this.dashboardFilterForm.tempOrgKey = data.value
              this.dashboardFilterForm.tempOrgPath = path.join(' / ')
            },
            // 浮窗打开时初始化（统计看板）
            handleDashboardOrgPopoverOpen() {
              // 初始化临时变量为当前选中的值
              this.dashboardFilterForm.tempOrgKey = this.dashboardFilterForm.currentOrgKey
              this.dashboardFilterForm.tempOrgPath = this.dashboardFilterForm.selectedOrgPath
              // 恢复树的选择状态
              this.$nextTick(() => {
                if (this.$refs.dashboardOrgTree) {
                  this.$refs.dashboardOrgTree.setCurrentKey(this.dashboardFilterForm.currentOrgKey)
                }
              })
            },
            // 确认选择机构（统计看板）
            handleDashboardOrgConfirm() {
              if (!this.dashboardFilterForm.tempOrgKey) {
                this.$message.warning('请先选择机构')
                return
              }

              // 从临时变量应用到正式变量
              this.dashboardFilterForm.currentOrgKey = this.dashboardFilterForm.tempOrgKey
              this.dashboardFilterForm.selectedOrgPath = this.dashboardFilterForm.tempOrgPath
              this.dashboardFilterForm.organization = [this.dashboardFilterForm.tempOrgKey]

              // 查找选中的节点判断层级
              const selectedNode = this.findNodeByValue(
                this.dashboardFilterForm.tempOrgKey,
                this.orgTreeData
              )
              if (selectedNode) {
                const level = this.getNodeLevel(selectedNode, this.orgTreeData)
                if (level === 3 || level === 4) {
                  // 一支或二支，禁用部门选择
                  this.dashboardFilterForm.isBranchSelected = true
                  this.dashboardFilterForm.department = ''
                  this.$message.warning('已选择一支或二支机构，所属部门不可选择')
                } else {
                  // 省或市，允许选择部门
                  this.dashboardFilterForm.isBranchSelected = false
                }
              }

              this.dashboardOrgPopoverVisible = false
            },
            // 取消选择机构（统计看板）
            handleDashboardOrgCancel() {
              // 恢复原来的选择
              this.dashboardFilterForm.tempOrgKey = this.dashboardFilterForm.currentOrgKey
              this.dashboardFilterForm.tempOrgPath = this.dashboardFilterForm.selectedOrgPath
              // 恢复树的选择状态
              if (this.$refs.dashboardOrgTree) {
                this.$refs.dashboardOrgTree.setCurrentKey(this.dashboardFilterForm.currentOrgKey)
              }
              this.dashboardOrgPopoverVisible = false
            },
            // 浮窗打开时初始化（台账明细管理）
            handleLedgerOrgPopoverOpen() {
              // 初始化临时变量为当前选中的值
              this.filterForm.tempOrgKey = this.filterForm.currentOrgKey
              this.filterForm.tempOrgPath = this.filterForm.selectedOrgPath
              // 恢复树的选择状态
              this.$nextTick(() => {
                if (this.$refs.ledgerOrgTree) {
                  this.$refs.ledgerOrgTree.setCurrentKey(this.filterForm.currentOrgKey)
                }
              })
            },
            // 处理机构树节点点击（台账明细管理）- 临时选择
            handleLedgerOrgTreeNodeClick(data, node) {
              // 构建路径（从根到当前节点）
              const path = []
              let currentNode = node
              while (currentNode && currentNode.data) {
                path.unshift(currentNode.data.label)
                currentNode = currentNode.parent
              }

              // 临时保存选中的机构和路径
              this.filterForm.tempOrgKey = data.value
              this.filterForm.tempOrgPath = path.join(' / ')
            },
            // 确认选择机构（台账明细管理）
            handleLedgerOrgConfirm() {
              if (!this.filterForm.tempOrgKey) {
                this.$message.warning('请先选择机构')
                return
              }

              // 从临时变量应用到正式变量
              this.filterForm.currentOrgKey = this.filterForm.tempOrgKey
              this.filterForm.selectedOrgPath = this.filterForm.tempOrgPath
              this.filterForm.organization = [this.filterForm.tempOrgKey]

              // 查找选中的节点判断层级
              const selectedNode = this.findNodeByValue(
                this.filterForm.tempOrgKey,
                this.orgTreeData
              )
              if (selectedNode) {
                const level = this.getNodeLevel(selectedNode, this.orgTreeData)
                if (level === 3 || level === 4) {
                  // 一支或二支，禁用部门选择
                  this.filterForm.isBranchSelected = true
                  this.filterForm.department = ''
                  this.$message.warning('已选择一支或二支机构，所属部门不可选择')
                } else {
                  // 省或市，允许选择部门
                  this.filterForm.isBranchSelected = false
                }
              }

              this.ledgerOrgPopoverVisible = false
            },
            // 取消选择机构（台账明细管理）
            handleLedgerOrgCancel() {
              // 恢复原来的选择
              this.filterForm.tempOrgKey = this.filterForm.currentOrgKey
              this.filterForm.tempOrgPath = this.filterForm.selectedOrgPath
              // 恢复树的选择状态
              if (this.$refs.ledgerOrgTree) {
                this.$refs.ledgerOrgTree.setCurrentKey(this.filterForm.currentOrgKey)
              }
              this.ledgerOrgPopoverVisible = false
            },
            // 获取节点层级
            getNodeLevel(node, treeData, currentLevel = 1) {
              for (const item of treeData) {
                if (item.value === node.value) {
                  return currentLevel
                }
                if (item.children && item.children.length > 0) {
                  const found = this.getNodeLevel(node, item.children, currentLevel + 1)
                  if (found) return found
                }
              }
              return null
            },
            // 根据value查找节点
            findNodeByValue(value, treeData) {
              for (const item of treeData) {
                if (item.value === value) {
                  return item
                }
                if (item.children && item.children.length > 0) {
                  const found = this.findNodeByValue(value, item.children)
                  if (found) return found
                }
              }
              return null
            },
            // ========== 用户管理机构选择处理方法 ==========
            handleUserOrgPopoverOpen() {
              this.userFilterForm.tempOrgKey = this.userFilterForm.currentOrgKey
              this.userFilterForm.tempOrgPath = this.userFilterForm.selectedOrgPath
              this.$nextTick(() => {
                if (this.$refs.userOrgTree) {
                  this.$refs.userOrgTree.setCurrentKey(this.userFilterForm.currentOrgKey)
                }
              })
            },
            handleUserOrgTreeNodeClick(data, node) {
              const path = []
              let currentNode = node
              while (currentNode && currentNode.data) {
                path.unshift(currentNode.data.label)
                currentNode = currentNode.parent
              }
              this.userFilterForm.tempOrgKey = data.value
              this.userFilterForm.tempOrgPath = path.join(' / ')
            },
            handleUserOrgConfirm() {
              if (!this.userFilterForm.tempOrgKey) {
                this.$message.warning('请先选择机构')
                return
              }
              this.userFilterForm.currentOrgKey = this.userFilterForm.tempOrgKey
              this.userFilterForm.selectedOrgPath = this.userFilterForm.tempOrgPath
              this.userFilterForm.org = [this.userFilterForm.tempOrgKey]
              this.userOrgPopoverVisible = false
            },
            handleUserOrgCancel() {
              this.userFilterForm.tempOrgKey = this.userFilterForm.currentOrgKey
              this.userFilterForm.tempOrgPath = this.userFilterForm.selectedOrgPath
              if (this.$refs.userOrgTree) {
                this.$refs.userOrgTree.setCurrentKey(this.userFilterForm.currentOrgKey)
              }
              this.userOrgPopoverVisible = false
            },
            // ========== 排查资料管理机构选择处理方法 ==========
            handleSubmissionOrgPopoverOpen() {
              this.submissionFilterForm.tempOrgKey = this.submissionFilterForm.currentOrgKey
              this.submissionFilterForm.tempOrgPath = this.submissionFilterForm.selectedOrgPath
              this.$nextTick(() => {
                if (this.$refs.submissionOrgTree) {
                  this.$refs.submissionOrgTree.setCurrentKey(
                    this.submissionFilterForm.currentOrgKey
                  )
                }
              })
            },
            handleSubmissionOrgTreeNodeClick(data, node) {
              const path = []
              let currentNode = node
              while (currentNode && currentNode.data) {
                path.unshift(currentNode.data.label)
                currentNode = currentNode.parent
              }
              this.submissionFilterForm.tempOrgKey = data.value
              this.submissionFilterForm.tempOrgPath = path.join(' / ')
            },
            handleSubmissionOrgConfirm() {
              if (!this.submissionFilterForm.tempOrgKey) {
                this.$message.warning('请先选择机构')
                return
              }
              this.submissionFilterForm.currentOrgKey = this.submissionFilterForm.tempOrgKey
              this.submissionFilterForm.selectedOrgPath = this.submissionFilterForm.tempOrgPath
              this.submissionFilterForm.organization = [this.submissionFilterForm.tempOrgKey]
              this.submissionOrgPopoverVisible = false
            },
            handleSubmissionOrgCancel() {
              this.submissionFilterForm.tempOrgKey = this.submissionFilterForm.currentOrgKey
              this.submissionFilterForm.tempOrgPath = this.submissionFilterForm.selectedOrgPath
              if (this.$refs.submissionOrgTree) {
                this.$refs.submissionOrgTree.setCurrentKey(this.submissionFilterForm.currentOrgKey)
              }
              this.submissionOrgPopoverVisible = false
            },
            // ========== 排查汇总统计机构选择处理方法（多选） ==========
            handleOrgStatisticsOrgPopoverOpen() {
              this.orgStatisticsFilterForm.tempCheckedKeys = [
                ...this.orgStatisticsFilterForm.organizationCheckedKeys,
              ]
              this.$nextTick(() => {
                if (this.$refs.orgStatisticsOrgTree) {
                  this.$refs.orgStatisticsOrgTree.setCheckedKeys(
                    this.orgStatisticsFilterForm.organizationCheckedKeys
                  )
                }
              })
            },
            handleOrgStatisticsOrgTreeCheck(data, checked) {
              const checkedKeys = this.$refs.orgStatisticsOrgTree.getCheckedKeys()
              this.orgStatisticsFilterForm.tempCheckedKeys = checkedKeys
            },
            handleOrgStatisticsOrgConfirm() {
              this.orgStatisticsFilterForm.organizationCheckedKeys = [
                ...this.orgStatisticsFilterForm.tempCheckedKeys,
              ]
              // 更新organization数组
              this.orgStatisticsFilterForm.organization = [
                ...this.orgStatisticsFilterForm.tempCheckedKeys,
              ]
              // 更新显示的路径文本
              const paths = []
              for (const key of this.orgStatisticsFilterForm.tempCheckedKeys) {
                const node = this.findNodeByValue(key, this.orgTreeData)
                if (node) {
                  paths.push(node.label)
                }
              }
              this.orgStatisticsFilterForm.selectedOrgPaths =
                paths.length > 0 ? paths.join('、') : ''
              this.orgStatisticsOrgPopoverVisible = false
            },
            handleOrgStatisticsOrgCancel() {
              this.orgStatisticsFilterForm.tempCheckedKeys = [
                ...this.orgStatisticsFilterForm.organizationCheckedKeys,
              ]
              if (this.$refs.orgStatisticsOrgTree) {
                this.$refs.orgStatisticsOrgTree.setCheckedKeys(
                  this.orgStatisticsFilterForm.organizationCheckedKeys
                )
              }
              this.orgStatisticsOrgPopoverVisible = false
            },
          },
        })

        console.log('Vue实例创建完成')
      }
    </script>
  </body>
</html>
